MCPcopy Index your code
hub / github.com/python/cpython / _days_before_year

Function _days_before_year

Lib/_pydatetime.py:51–54  ·  view source on GitHub ↗

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

(year)

Source from the content-addressed store, hash-verified

49 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
50
51def _days_before_year(year):
52 "year -> number of days before January 1st of year."
53 y = year - 1
54 return y*365 + y//4 - y//100 + y//400
55
56def _days_in_month(year, month):
57 "year, month -> number of days in that month in that year."

Callers 2

_ymd2ordFunction · 0.85
_pydatetime.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…