Example usage for java.time OffsetDateTime isEqual

List of usage examples for java.time OffsetDateTime isEqual

Introduction

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

Prototype

public boolean isEqual(OffsetDateTime other) 

Source Link

Document

Checks if the instant of this date-time is equal to 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.isEqual(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  a2s  .  c  o m
}