operator ^ method

int operator ^(
  1. Date other
)

distance between two dates

(we use this operator since we used operator - for subtracting days)

d1 ^ d2 is mathematically equivalent to d1 minus d2

Implementation

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