Example usage for java.time LocalTime MIDNIGHT

List of usage examples for java.time LocalTime MIDNIGHT

Introduction

In this page you can find the example usage for java.time LocalTime MIDNIGHT.

Prototype

LocalTime MIDNIGHT

To view the source code for java.time LocalTime MIDNIGHT.

Click Source Link

Document

The time of midnight at the start of the day, '00:00'.

Usage

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.plusSeconds(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.plusHours(4);//  w ww. jav  a 2  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.plusDays(4);/*from ww  w .  ja  v  a  2  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.plusMillis(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.getNano());
    duration = duration.minusNanos(3);/* w  ww.  j  av  a  2 s . co m*/
    System.out.println(duration.getNano());

}

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) {
    Duration duration = Duration.between(LocalTime.MIDNIGHT, LocalTime.NOON);
    System.out.println(duration.getSeconds());

    duration = duration.dividedBy(2);/*from  ww w .  j  a v  a  2s.c  o  m*/

    System.out.println(duration.getSeconds());

}