MCPcopy Index your code
hub / github.com/python-pendulum/pendulum / _start_of_week

Method _start_of_week

src/pendulum/date.py:438–447  ·  view source on GitHub ↗

Reset the date to the first day of the week.

(self)

Source from the content-addressed store, hash-verified

436 return self.set(year, 12, 31)
437
438 def _start_of_week(self) -> Self:
439 """
440 Reset the date to the first day of the week.
441 """
442 dt = self
443
444 if self.day_of_week != pendulum._WEEK_STARTS_AT:
445 dt = self.previous(pendulum._WEEK_STARTS_AT)
446
447 return dt.start_of("day")
448
449 def _end_of_week(self) -> Self:
450 """

Callers

nothing calls this directly

Calls 2

previousMethod · 0.95
start_ofMethod · 0.45

Tested by

no test coverage detected