leapYear property

  1. @useResult
bool get leapYear

Whether the is year is a leap year.

DateTime(2020).leapYear; // true
DateTime(2021).leapYear; // false

Implementation

@useResult bool get leapYear => Dates.leapYear(year);