distanceTo method

int distanceTo(
  1. Date other
)

distance between two dates

d1.distanceTo(d2) is equivalent to d2 ^ d1 and mathematically equivalent to d1 minus d2

Implementation

int distanceTo(Date other) {
  return other.julianDayNumber - julianDayNumber;
}