MCPcopy Create free account
hub / github.com/python/cpython / _post_epoch_days_before_year

Function _post_epoch_days_before_year

Lib/zoneinfo/_zoneinfo.py:514–517  ·  view source on GitHub ↗

Get the number of days between 1970-01-01 and YEAR-01-01

(year)

Source from the content-addressed store, hash-verified

512
513
514def _post_epoch_days_before_year(year):
515 """Get the number of days between 1970-01-01 and YEAR-01-01"""
516 y = year - 1
517 return y * 365 + y // 4 - y // 100 + y // 400 - EPOCHORDINAL
518
519
520class _DayOffset:

Callers 2

year_to_epochMethod · 0.85
_ymd2ordMethod · 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…