isLeapYear property

bool isLeapYear

Returns true if this year is a leap year.

Implementation

bool get isLeapYear =>
    // Leap years are used since 1582.
    year >= 1582 && year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);