MCPcopy Index your code
hub / github.com/RustPython/RustPython / isleap

Function isleap

Lib/calendar.py:143–145  ·  view source on GitHub ↗

Return True for leap years, False for non-leap years.

(year)

Source from the content-addressed store, hash-verified

141
142
143def isleap(year):
144 """Return True for leap years, False for non-leap years."""
145 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
146
147
148def leapdays(y1, y2):

Callers 2

monthrangeFunction · 0.85
_monthlenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected