This method returns a new instance of local date by adding the specified amount to the month field adjusting other fields if necessary. The original instance is not changed.
The provided monthsToAdd can be negative, in that case months will be subtracted.
This method will throw DateTimeException if the result exceeds the supported date range
Examples
package com.logicbig.example.localdate;
import java.time.LocalDate;
public class PlusMonthsExample {
public static void main (String... args) { LocalDate d = LocalDate.of(2001, 11, 22); LocalDate d2 = d.plusMonths(10); System.out.println(d2);