List of usage examples for java.time LocalDate of
public static LocalDate of(int year, int month, int dayOfMonth)
From source file:Main.java
public static void main(String[] argv) { LocalDate d = LocalDate.of(1491, Month.JUNE, 28); System.out.println(d); }
From source file:Main.java
public static void main(String[] args) { LocalDate dob = LocalDate.of(1971, Month.MAY, 16); System.out.printf("%1$tB %1$td, %1$tY is %2$s's birth day. Let's go and celebrate.", dob, "Mike"); }
From source file:Main.java
public static void main(String[] args) { LocalDate a = LocalDate.of(2014, Month.APRIL, 10); System.out.println(a); }
From source file:Main.java
public static void main(String[] args) { LocalDate a = LocalDate.of(2014, 6, 30); System.out.println(a.atStartOfDay(ZoneId.systemDefault())); }
From source file:Main.java
public static void main(String[] args) { LocalDate a = LocalDate.of(2014, 6, 30); LocalDate b = a.plus(Period.ofDays(100)); System.out.println(b);//from ww w. ja va2s . c o m }
From source file:Main.java
public static void main(String[] args) { LocalDate a = LocalDate.of(2014, 6, 30); LocalDate b = a.minus(Period.ofDays(100)); System.out.println(b);//from w w w.j av a2s . c o m }
From source file:Main.java
public static void main(String[] args) { LocalDate a = LocalDate.of(2014, 6, 30); Period p = a.until(LocalDate.of(2015, 6, 30)); System.out.println(p);/*w ww . j a v a 2s . c om*/ }
From source file:Main.java
public static void main(String[] args) { LocalDate a = LocalDate.of(2014, 6, 30); LocalDateTime l = a.atTime(2, 3); System.out.println(l); }
From source file:Main.java
public static void main(String[] args) { LocalDate a = LocalDate.of(2014, 6, 30); LocalDateTime l = a.atTime(2, 3, 4); System.out.println(l); }
From source file:Main.java
public static void main(String[] args) { LocalDate a = LocalDate.of(2014, 6, 30); LocalDateTime l = a.atTime(2, 3, 4, 5); System.out.println(l);//from www . ja v a 2s. co m }