isLeapYear property
bool
isLeapYear
Returns true if this
is in a leap year.
In the Gregorian calendar, three criteria must be taken into account to identify leap years:
- the year must be evenly divisible by 4;
- if the year can also be evenly divided by 100, it is not a leap year;
- unless the year is also evenly divisible by 400. Then it is a leap year.
Implementation
bool get isLeapYear => _isLeapYear(year);