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, 01); LocalDateTime t = a.withYear(2012); System.out.println(t);//from w w w .j a v a 2 s. co m }
From source file:Main.java
public static void main(String[] args) { LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 00); LocalDateTime t = a.minusDays(100); System.out.println(t);//from www .java 2s.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.plusDays(100); System.out.println(t);/* www . 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, 01); LocalDateTime t = a.withHour(12); System.out.println(t);//from w w w. ja v a2 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.minusMonths(10); System.out.println(t);/* w w w. j a va 2 s. co m*/ }
From source file:Main.java
public static void main(String[] args) { LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 01); LocalDateTime t = a.withSecond(1234); System.out.println(t);/*from w ww .ja v a 2s . 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.minusMinutes(100); System.out.println(t);// w w w . ja va 2s.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.plusMinutes(100); System.out.println(t);//from w w w .jav a2s. c om }
From source file:Main.java
public static void main(String[] args) { LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 01); LocalDateTime t = a.withNano(1234); System.out.println(t);/*from w w w . j av 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, 01); LocalDateTime t = a.withDayOfMonth(20); System.out.println(t);/*w w w. j av a 2 s . co m*/ }