isLeapYear method
Returns whether or not the given year is a leap year in this calendar.
year
: The year to consider.
Returns: True if the given year is a leap year; false otherwise.
ArgumentOutOfRangeException
: The given year is invalid for this calendar.
Note that some implementations may return a value rather than throw this exception. Failure to throw an exception should not be treated as an indication that the year is valid.
Implementation
bool isLeapYear(int year) {
Preconditions.checkArgumentRange('year', year, minYear, maxYear);
return _yearMonthDayCalculator.isLeapYear(year);
}