deltaYears method

int deltaYears(
  1. CalendarYear other
)

The difference in years between the other year and this year. If other is later than this year, this will be a positive number. For all N, year.deltaYears(year.addYears(N)) == N.

Implementation

int deltaYears(CalendarYear other) => other.year - year;