List of usage examples for java.time Period plus
public Period plus(TemporalAmount amountToAdd)
From source file:Main.java
public static void main(String[] args) { Period p = Period.ofMonths(1); Period l = p.plus(Period.ofMonths(1)); System.out.println(l);/*from w w w . j av a 2 s . c o m*/ }
From source file:Main.java
public static void main(String[] args) { Period p1 = Period.of(2, 3, 5); Period p2 = Period.of(1, 15, 28); System.out.println(p1);//from ww w . j a v a 2s.c o m System.out.println(p2); System.out.println(p1.minus(p2)); System.out.println(p1.plus(p2)); System.out.println(p1.plus(p2).normalized()); }