Reset the date to the first day of the week.
(self)
| 436 | return self.set(year, 12, 31) |
| 437 | |
| 438 | def _start_of_week(self) -> Self: |
| 439 | """ |
| 440 | Reset the date to the first day of the week. |
| 441 | """ |
| 442 | dt = self |
| 443 | |
| 444 | if self.day_of_week != pendulum._WEEK_STARTS_AT: |
| 445 | dt = self.previous(pendulum._WEEK_STARTS_AT) |
| 446 | |
| 447 | return dt.start_of("day") |
| 448 | |
| 449 | def _end_of_week(self) -> Self: |
| 450 | """ |