monthDifference static method

int monthDifference(
  1. DateTime first,
  2. DateTime last
)

Implementation

static int monthDifference(DateTime first, DateTime last) {
  return (last.year - first.year) * 12 + last.month - first.month;
}