doubledate.isleap#

doubledate.isleap(year) bool#

Returns whether the given year (or date’s year) is a leap-year.

Parameters:

year (int, datetime.date) – the year, or the date for whose year to determine whether it is a leap year or not

Examples

>>> isleap(2020)
True #2020 is a leap year
>>> isleap(datetime.date(2020, 4, 10))
True #also accepts a datetime