getCountFromDiffDate static method

int getCountFromDiffDate(
  1. DateTime firstDate,
  2. DateTime lastDate
)

Implementation

static int getCountFromDiffDate(DateTime firstDate, DateTime lastDate) {
  var yearsDifference = lastDate.year - firstDate.year;
  return 12 * yearsDifference + lastDate.month - firstDate.month;
}