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

Method _end_of_week

src/pendulum/datetime.py:910–920  ·  view source on GitHub ↗

Reset the date to the last day of the week and the time to 23:59:59.

(self)

Source from the content-addressed store, hash-verified

908 return dt.start_of("day")
909
910 def _end_of_week(self) -> Self:
911 """
912 Reset the date to the last day of the week
913 and the time to 23:59:59.
914 """
915 dt = self
916
917 if self.day_of_week != pendulum._WEEK_ENDS_AT:
918 dt = self.next(pendulum._WEEK_ENDS_AT)
919
920 return dt.end_of("day")
921
922 def next(self, day_of_week: WeekDay | None = None, keep_time: bool = False) -> Self:
923 """

Callers

nothing calls this directly

Calls 2

nextMethod · 0.95
end_ofMethod · 0.45

Tested by

no test coverage detected