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

Method _end_of_week

src/pendulum/date.py:449–458  ·  view source on GitHub ↗

Reset the date to the last day of the week.

(self)

Source from the content-addressed store, hash-verified

447 return dt.start_of("day")
448
449 def _end_of_week(self) -> Self:
450 """
451 Reset the date to the last day of the week.
452 """
453 dt = self
454
455 if self.day_of_week != pendulum._WEEK_ENDS_AT:
456 dt = self.next(pendulum._WEEK_ENDS_AT)
457
458 return dt.end_of("day")
459
460 def next(self, day_of_week: WeekDay | None = None) -> Self:
461 """

Callers

nothing calls this directly

Calls 2

nextMethod · 0.95
end_ofMethod · 0.45

Tested by

no test coverage detected