List of usage examples for java.time Month plus
public Month plus(long months)
From source file:Main.java
public static void main(String[] args) { Month m = Month.from(LocalDate.now()); System.out.println(m.plus(8)); }
From source file:Main.java
public static void main(String[] args) { LocalDate localDate = LocalDate.of(2014, Month.AUGUST, 3); System.out.println(localDate); Month month1 = Month.from(localDate); System.out.println(month1);//from w ww . j a v a 2 s.com Month month2 = Month.of(2); System.out.println(month2); Month month3 = month2.plus(2); System.out.println(month3); Month month4 = localDate.getMonth(); System.out.println(month4); int monthIntValue = month2.getValue(); System.out.println(monthIntValue); }