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

Method _last_of_quarter

src/pendulum/datetime.py:1098–1105  ·  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. DateTime.MONDAY.

(self, day_of_week: WeekDay | None = None)

Source from the content-addressed store, hash-verified

1096 )
1097
1098 def _last_of_quarter(self, day_of_week: WeekDay | None = None) -> Self:
1099 """
1100 Modify to the last occurrence of a given day of the week
1101 in the current quarter. If no day_of_week is provided,
1102 modify to the last day of the quarter. Use the supplied consts
1103 to indicate the desired day_of_week, ex. DateTime.MONDAY.
1104 """
1105 return self.on(self.year, self.quarter * 3, 1).last_of("month", day_of_week)
1106
1107 def _nth_of_quarter(
1108 self, nth: int, day_of_week: WeekDay | None = None

Callers

nothing calls this directly

Calls 2

onMethod · 0.95
last_ofMethod · 0.45

Tested by

no test coverage detected