MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _is_leap

Function _is_leap

tools/python-3.11.9-amd64/Lib/datetime.py:42–44  ·  view source on GitHub ↗

year -> 1 if leap year, else 0.

(year)

Source from the content-addressed store, hash-verified

40del dbm, dim
41
42def _is_leap(year):
43 "year -> 1 if leap year, else 0."
44 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
45
46def _days_before_year(year):
47 "year -> number of days before January 1st of year."

Callers 4

_days_in_monthFunction · 0.85
_days_before_monthFunction · 0.85
_ord2ymdFunction · 0.85
_isoweek_to_gregorianFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected