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

Function _days_before_year

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

year -> number of days before January 1st of year.

(year)

Source from the content-addressed store, hash-verified

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."
48 y = year - 1
49 return y*365 + y//4 - y//100 + y//400
50
51def _days_in_month(year, month):
52 "year, month -> number of days in that month in that year."

Callers 2

_ymd2ordFunction · 0.85
datetime.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected