Java LocalDateTime Calculate isOverdue(LocalDateTime dueTime)

Here you can find the source of isOverdue(LocalDateTime dueTime)

Description

Checks against system time if the provided dueTime is before system time.

License

Open Source License

Parameter

Parameter Description
dueTime The due time to check against with the current system time.

Return

Returns true if the provided dueTime is before system time.

Declaration

public static boolean isOverdue(LocalDateTime dueTime) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.time.LocalDateTime;

public class Main {
    public static final LocalDateTime now = LocalDateTime.now();

    /**/*from w  w  w .  j a  v a2 s  . c  o  m*/
     * Checks against system time if the provided dueTime is before system time.
     *
     * @param dueTime The due time to check against with the current system time.
     * @return Returns true if the provided dueTime is before system time.
     */
    public static boolean isOverdue(LocalDateTime dueTime) {
        return dueTime.isBefore(LocalDateTime.now());
    }
}

Related

  1. getTimePart(final LocalDateTime dateTime)
  2. getZonedDateTime(LocalDateTime dateTime, TimeZone timeZone)
  3. isAfter(LocalDateTime endDateTime, LocalDateTime startDateTime)
  4. isAfterNow(LocalDateTime pValidUntil)
  5. isBefore(LocalDateTime dateTime1, LocalDateTime dateTime2)
  6. isToday(LocalDateTime dateTime)
  7. isTodayOrYesterday(LocalDateTime date)
  8. isWithin(LocalDateTime start, LocalDateTime end)
  9. last(LocalDateTime from, int dayOfWeek)