MCPcopy Create free account
hub / github.com/python-pendulum/pendulum / _start_of_century

Method _start_of_century

src/pendulum/date.py:422–428  ·  view source on GitHub ↗

Reset the date to the first day of the century.

(self)

Source from the content-addressed store, hash-verified

420 return self.set(year, 12, 31)
421
422 def _start_of_century(self) -> Self:
423 """
424 Reset the date to the first day of the century.
425 """
426 year = self.year - 1 - (self.year - 1) % YEARS_PER_CENTURY + 1
427
428 return self.set(year, 1, 1)
429
430 def _end_of_century(self) -> Self:
431 """

Callers

nothing calls this directly

Calls 1

setMethod · 0.95

Tested by

no test coverage detected