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

Method _ymd2ord

Lib/zoneinfo/_zoneinfo.py:584–590  ·  view source on GitHub ↗
(cls, year, month, day)

Source from the content-addressed store, hash-verified

582
583 @classmethod
584 def _ymd2ord(cls, year, month, day):
585 return (
586 _post_epoch_days_before_year(year)
587 + cls._DAYS_BEFORE_MONTH[month]
588 + (month > 2 and calendar.isleap(year))
589 + day
590 )
591
592 # TODO: These are not actually epoch dates as they are expressed in local time
593 def year_to_epoch(self, year):

Callers 1

year_to_epochMethod · 0.95

Calls 1

Tested by

no test coverage detected