List of usage examples for java.time Period minus
public Period minus(TemporalAmount amountToSubtract)
From source file:Main.java
public static void main(String[] args) { Period p = Period.ofMonths(1); Period l = p.minus(Period.ofMonths(1)); System.out.println(l);/*w ww. ja va2s . 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);// www. j a va2s . co m System.out.println(p2); System.out.println(p1.minus(p2)); System.out.println(p1.plus(p2)); System.out.println(p1.plus(p2).normalized()); }