Example usage for java.time LocalTime NOON

List of usage examples for java.time LocalTime NOON

Introduction

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

Prototype

LocalTime NOON

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

Click Source Link

Document

The time of noon in the middle of the day, '12:00'.

Usage

From source file:Main.java

public static void main(String[] args) {
    LocalTime l = LocalTime.NOON;

    System.out.println(l);
}

From source file:Main.java

public static void main(String[] args) {
    LocalTime l = LocalTime.now();
    LocalTime s = l.with(LocalTime.NOON);
    System.out.println(s);
}

From source file:Main.java

public static void main(String[] args) {
    LocalTime l = LocalTime.now();

    System.out.println(l.equals(LocalTime.NOON));
}

From source file:Main.java

public static void main(String[] args) {
    LocalTime l = LocalTime.now();

    System.out.println(l.isAfter(LocalTime.NOON));
}

From source file:Main.java

public static void main(String[] args) {
    LocalTime l = LocalTime.now();

    System.out.println(l.isBefore(LocalTime.NOON));
}

From source file:Main.java

public static void main(String[] args) {
    LocalTime l = LocalTime.now();

    System.out.println(l.compareTo(LocalTime.NOON));
}

From source file:Main.java

public static void main(String[] args) {
    Duration duration = Duration.between(LocalTime.MIDNIGHT, LocalTime.NOON);
    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.isZero());
}

From source file:Main.java

public static void main(String[] args) {
    Duration duration = Duration.between(LocalTime.MIDNIGHT, LocalTime.NOON);
    System.out.println(duration.getSeconds());
    System.out.println(duration.toString());
}

From source file:Main.java

public static void main(String[] args) {
    Duration duration = Duration.between(LocalTime.MIDNIGHT, LocalTime.NOON);
    System.out.println(duration.toMillis());

}