public LocalDate withYear (int year)

Returns a copy of this LocalDate with the year altered.

If the day-of-month is invalid for the year, it will be changed to the last valid day of the month.

This instance is immutable and unaffected by this method call.

Parameters:
year    the year to set in the result, from MIN_YEAR to MAX_YEAR

Returns:  a LocalDate based on this date with the requested year, not null

Exceptions:
DateTimeException    if the year value is invalid