monthLength property

  1. @override
int get monthLength
override

Computes number of days in a given month in a Gregorian year.

Implementation

@override
int get monthLength {
  if (month == 2) {
    return isLeapYear() ? 29 : 28;
  } else {
    return _MONTH_LENGTHS[month - 1];
  }
}