MCPcopy Index your code
hub / github.com/RustPython/RustPython / year_to_epoch

Method year_to_epoch

Lib/zoneinfo/_zoneinfo.py:530–540  ·  view source on GitHub ↗
(self, year)

Source from the content-addressed store, hash-verified

528 self.second = second
529
530 def year_to_epoch(self, year):
531 days_before_year = _post_epoch_days_before_year(year)
532
533 d = self.d
534 if self.julian and d >= 59 and calendar.isleap(year):
535 d += 1
536
537 epoch = (days_before_year + d) * 86400
538 epoch += self.hour * 3600 + self.minute * 60 + self.second
539
540 return epoch
541
542
543class _CalendarOffset:

Callers 1

transitionsMethod · 0.45

Calls 1

Tested by

no test coverage detected