List of usage examples for java.time Period ofMonths
public static Period ofMonths(int months)
From source file:Main.java
public static void main(String[] args) { Period p = Period.ofMonths(1); System.out.println(p.isZero()); }
From source file:Main.java
public static void main(String[] args) { Period p = Period.ofMonths(1); System.out.println(p.isNegative()); }
From source file:Main.java
public static void main(String[] args) { Period p = Period.ofMonths(1); System.out.println(p.getYears()); }
From source file:Main.java
public static void main(String[] args) { Period p = Period.ofMonths(1); System.out.println(p.getChronology()); }
From source file:Main.java
public static void main(String[] args) { Period p = Period.ofMonths(1); System.out.println(p.getMonths()); }
From source file:Main.java
public static void main(String[] args) { Period p = Period.ofMonths(1); System.out.println(p.getDays()); }
From source file:Main.java
public static void main(String[] args) { Period p = Period.ofMonths(1); System.out.println(p.getUnits()); }
From source file:Main.java
public static void main(String[] args) { Period p = Period.ofMonths(1); Period l = p.minusYears(10); System.out.println(l); }
From source file:Main.java
public static void main(String[] args) { Period p = Period.ofMonths(1); long l = p.toTotalMonths(); System.out.println(l); }
From source file:Main.java
public static void main(String[] args) { Period p = Period.ofMonths(123); Period l = p.normalized(); System.out.println(l); }