List of usage examples for java.time LocalTime NOON
LocalTime NOON
To view the source code for java.time LocalTime NOON.
Click Source Link
From source file:Main.java
public static void main(String[] args) { Duration duration = Duration.between(LocalTime.MIDNIGHT, LocalTime.NOON); System.out.println(duration.getSeconds()); duration = duration.minusMinutes(300); System.out.println(duration.getSeconds()); }
From source file:Main.java
public static void main(String[] args) { Duration duration = Duration.between(LocalTime.MIDNIGHT, LocalTime.NOON); System.out.println(duration.getSeconds()); duration = duration.plusMinutes(4000); System.out.println(duration.getSeconds()); }
From source file:Main.java
public static void main(String[] args) { Duration duration = Duration.between(LocalTime.MIDNIGHT, LocalTime.NOON); System.out.println(duration.getSeconds()); duration = duration.minusMillis(300); System.out.println(duration.getSeconds()); }
From source file:Main.java
public static void main(String[] args) { Duration duration = Duration.between(LocalTime.MIDNIGHT, LocalTime.NOON); System.out.println(duration.getSeconds()); duration = duration.withSeconds(1000); System.out.println(duration.getSeconds()); }
From source file:Main.java
public static void main(String[] args) { LocalTime l = LocalTime.now(); LocalTime t = LocalTime.NOON; Temporal s = l.adjustInto(t); System.out.println(s);/*from w w w . ja v a 2s . c om*/ }
From source file:Main.java
public static void main(String[] args) { Duration duration = Duration.between(LocalTime.MIDNIGHT, LocalTime.NOON); System.out.println(duration.getSeconds()); duration = duration.dividedBy(2);//from w ww.j a va2 s .c o m System.out.println(duration.getSeconds()); }
From source file:Main.java
public static void main(String[] args) { Duration duration = Duration.between(LocalTime.MIDNIGHT, LocalTime.NOON); System.out.println(duration.getSeconds()); duration = duration.multipliedBy(2); System.out.println(duration.getSeconds()); }
From source file:Main.java
public static void main(String[] args) { LocalTime l = LocalTime.now(); long s = l.until(LocalTime.NOON, ChronoUnit.HOURS); System.out.println(s);//from w ww.j a v a 2 s. c om }
From source file:Main.java
public static void main(String[] args) { LocalDateTime a = LocalDateTime.of(LocalDate.now(), LocalTime.NOON); System.out.println(a); }
From source file:Main.java
public static void main(String[] args) { Duration duration = Duration.between(LocalTime.MIDNIGHT, LocalTime.NOON); System.out.println(duration.get(ChronoUnit.SECONDS)); }