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

Method _start_of_week

src/pendulum/datetime.py:898–908  ·  view source on GitHub ↗

Reset the date to the first day of the week and the time to 00:00:00.

(self)

Source from the content-addressed store, hash-verified

896 return self.set(year, 12, 31, 23, 59, 59, 999999)
897
898 def _start_of_week(self) -> Self:
899 """
900 Reset the date to the first day of the week
901 and the time to 00:00:00.
902 """
903 dt = self
904
905 if self.day_of_week != pendulum._WEEK_STARTS_AT:
906 dt = self.previous(pendulum._WEEK_STARTS_AT)
907
908 return dt.start_of("day")
909
910 def _end_of_week(self) -> Self:
911 """

Callers

nothing calls this directly

Calls 2

previousMethod · 0.95
start_ofMethod · 0.45

Tested by

no test coverage detected