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

Method _start_of_decade

src/pendulum/date.py:406–412  ·  view source on GitHub ↗

Reset the date to the first day of the decade.

(self)

Source from the content-addressed store, hash-verified

404 return self.set(self.year, 12, 31)
405
406 def _start_of_decade(self) -> Self:
407 """
408 Reset the date to the first day of the decade.
409 """
410 year = self.year - self.year % YEARS_PER_DECADE
411
412 return self.set(year, 1, 1)
413
414 def _end_of_decade(self) -> Self:
415 """

Callers

nothing calls this directly

Calls 1

setMethod · 0.95

Tested by

no test coverage detected