Modify to the first occurrence of a given day of the week in the current year. If no day_of_week is provided, modify to the first day of the year. Use the supplied consts to indicate the desired day_of_week, ex. pendulum.MONDAY.
(self, day_of_week: WeekDay | None = None)
| 676 | return self.set(self.year, dt.month, dt.day) |
| 677 | |
| 678 | def _first_of_year(self, day_of_week: WeekDay | None = None) -> Self: |
| 679 | """ |
| 680 | Modify to the first occurrence of a given day of the week |
| 681 | in the current year. If no day_of_week is provided, |
| 682 | modify to the first day of the year. Use the supplied consts |
| 683 | to indicate the desired day_of_week, ex. pendulum.MONDAY. |
| 684 | """ |
| 685 | return self.set(month=1).first_of("month", day_of_week) |
| 686 | |
| 687 | def _last_of_year(self, day_of_week: WeekDay | None = None) -> Self: |
| 688 | """ |