diff --git a/src/YearWeek.php b/src/YearWeek.php index 3b15760..9c3e0c5 100644 --- a/src/YearWeek.php +++ b/src/YearWeek.php @@ -236,6 +236,26 @@ public function atDay(int $dayOfWeek) : LocalDate return LocalDate::ofYearDay($this->year - 1, $daysOfPreviousYear + $dayOfYear); } + /** + * Returns the first day of this week. + * + * @return LocalDate + */ + public function getFirstDay() : LocalDate + { + return $this->atDay(DayOfWeek::MONDAY); + } + + /** + * Returns the last day of this week. + * + * @return LocalDate + */ + public function getLastDay() : LocalDate + { + return $this->atDay(DayOfWeek::SUNDAY); + } + /** * Returns a copy of this YearWeek with the specified period in years added. *