retrieveDaysInMonth static method

int retrieveDaysInMonth(
  1. DateTime month
)

Calculate the number of days in the specified month

Implementation

static int retrieveDaysInMonth(DateTime month) {
  var firstDayThisMonth = DateHelper.getFirstDayOfMonth(month: month);
  var firstDayNextMonth = DateHelper.getFirstDayOfNextMonth(month: month);
  return firstDayNextMonth.difference(firstDayThisMonth).inDays;
}