Returns a copy of this LocalDate
with the specified number of months added.
This method adds the specified amount to the months field in three steps:
For example, 2007-03-31 plus one month would result in the invalid date 2007-04-31. Instead of returning an invalid result, the last valid day of the month, 2007-04-30, is selected instead.
This instance is immutable and unaffected by this method call.
monthsToAdd | the months to add, may be negative |
LocalDate
based on this date with the months added, not null
DateTimeException | if the result exceeds the supported date range |
Diagram: LocalDate