List of usage examples for java.time LocalDateTime of
public static LocalDateTime of(int year, int month, int dayOfMonth, int hour, int minute)
From source file:Main.java
public static void main(String[] args) { LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 00); LocalDateTime t = a.plusMonths(100); System.out.println(t);// www.j a v a2 s . c o m }
From source file:Main.java
public static void main(String[] args) { LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 01); LocalDateTime t = a.withDayOfYear(2012); System.out.println(t);/*from w w w .j a v a 2 s . com*/ }
From source file:Main.java
public static void main(String[] args) { LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 00); LocalDateTime t = a.plusYears(100); System.out.println(t);//ww w . j a v a 2 s . c o m }
From source file:Main.java
public static void main(String[] args) { LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 00); LocalDateTime t = a.plusHours(100); System.out.println(t);/* ww w. j a v a2 s . c om*/ }
From source file:Main.java
public static void main(String[] args) { LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 00); LocalDateTime t = a.plusSeconds(100); System.out.println(t);/*from w w w . java 2 s. c o m*/ }
From source file:Main.java
public static void main(String[] args) { LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 01); LocalDateTime t = a.withMonth(2); System.out.println(t);//from w w w.ja v a 2 s . c o m }
From source file:Main.java
public static void main(String[] argv) { LocalDateTime d = LocalDateTime.of(1491, Month.JUNE, 28, 13, 51); System.out.println(d); }
From source file:Main.java
public static void main(String[] args) { LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 00); LocalDateTime t = a.minus(Period.ofDays(100)); System.out.println(t);/*from www. j a v a 2s .c om*/ }
From source file:Main.java
public static void main(String[] args) { LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 00); LocalDateTime t = a.plus(Period.ofDays(100)); System.out.println(t);//w w w. j a va 2s . c o m }
From source file:Main.java
public static void main(String[] args) { LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 01); System.out.println(a.isSupported(ChronoUnit.DAYS)); }