List of usage examples for java.time ZonedDateTime isEqual
default boolean isEqual(ChronoZonedDateTime<?> other)
From source file:io.stallion.jobs.Schedule.java
/** * Returns true if this schedule matches the passed in datetime * @param dt//from w w w . j a va 2 s . co m * @return */ public boolean matchesDateTime(ZonedDateTime dt) { ZonedDateTime now = dt.withSecond(0).withNano(0); ZonedDateTime nextRun = nextAt(now).withSecond(0).withNano(0); if (now.isEqual(nextRun)) { return true; } return false; }