Example usage for java.time OffsetDateTime isAfter

List of usage examples for java.time OffsetDateTime isAfter

Introduction

In this page you can find the example usage for java.time OffsetDateTime isAfter.

Prototype

public boolean isAfter(OffsetDateTime other) 

Source Link

Document

Checks if the instant of this date-time is after that of the specified date-time.

Usage

From source file:Main.java

public static void main(String[] args) {
    OffsetDateTime o = OffsetDateTime.MAX;

    System.out.println(o.isAfter(OffsetDateTime.MIN));
}

From source file:org.silverpeas.core.date.Period.java

private static void checkPeriod(final OffsetDateTime startDateTime, final OffsetDateTime endDateTime) {
    Objects.requireNonNull(startDateTime);
    Objects.requireNonNull(endDateTime);
    if (startDateTime.isAfter(endDateTime) || startDateTime.isEqual(endDateTime)) {
        throw new IllegalArgumentException("The end datetime must be after the start datetime");
    }/*from w w w.j a v  a 2 s  .c om*/
}