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)
| 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 | """ |