deltaMonths method
The difference in months between the other month and this month. If
other
is later than this month, this will be a positive number. For all
N
, month.deltaMonths(month.addMonths(N)) == N
.
Implementation
int deltaMonths(CalendarMonth other) =>
(other.year - year) * 12 + other.month - month;