isLeapYear property

bool get isLeapYear

Return true if is leap year, false otherwise.

Implementation

bool get isLeapYear {
  if (year % 4 != 0) {
    return false;
  } else if (year % 100 != 0) {
    return true;
  } else if (year % 400 != 0) {
    return false;
  } else {
    return true;
  }
}