getSignedMonthDifference static method
Calculates the signed difference in months from startDate to endDate.
Positive if endDate is after startDate, negative if before.
Day of month is ignored.
Implementation
static int getSignedMonthDifference({
required DateTime startDate,
required DateTime endDate,
}) =>
(endDate.year - startDate.year) * 12 + endDate.month - startDate.month;