src/MonthDay.php
public function atYear(int $year) : LocalDate
    {
        return LocalDate::of($year, $this->month, $this->isValidYear($year) ? $this->day : 28);
    }
public function atYear(int $year) : LocalDate
    {
        return LocalDate::of($year, $this->month, $this->isValidYear($year) ? $this->day : 28);
    }
public function atYear ( int $ year ) : LocalDate { return LocalDate :: of ( $ year , $ this -> month , $ this -> isValidYear ( $ year ) ? $ this -> day : 28 ) ; }
Combines this month-day with a year to create a LocalDate.

This returns a LocalDate formed from this month-day and the specified year.

A month-day of February 29th will be adjusted to February 28th
in the resulting date if the year is not a leap year.

@param int $year

@return LocalDate

@throws DateTimeException If the year is invalid.
Combines this month - day with a year to create a LocalDate .