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

Method _last_of_quarter

src/pendulum/date.py:646–653  ·  view source on GitHub ↗

Modify to the last occurrence of a given day of the week in the current quarter. If no day_of_week is provided, modify to the last day of the quarter. Use the supplied consts to indicate the desired day_of_week, ex. pendulum.MONDAY.

(self, day_of_week: WeekDay | None = None)

Source from the content-addressed store, hash-verified

644 )
645
646 def _last_of_quarter(self, day_of_week: WeekDay | None = None) -> Self:
647 """
648 Modify to the last occurrence of a given day of the week
649 in the current quarter. If no day_of_week is provided,
650 modify to the last day of the quarter. Use the supplied consts
651 to indicate the desired day_of_week, ex. pendulum.MONDAY.
652 """
653 return self.set(self.year, self.quarter * 3, 1).last_of("month", day_of_week)
654
655 def _nth_of_quarter(self, nth: int, day_of_week: WeekDay) -> Self | None:
656 """

Callers

nothing calls this directly

Calls 2

setMethod · 0.95
last_ofMethod · 0.45

Tested by

no test coverage detected