Java Date Before isBefore(Date date)

Here you can find the source of isBefore(Date date)

Description

is Before

License

Apache License

Declaration

public static boolean isBefore(Date date) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Calendar;
import java.util.Date;

public class Main {

    public static boolean isBefore(Date date) {
        return getCurrentDateTime().before(date);
    }//ww  w . j a v  a2s.c  o  m

    /**
     * Gets the current date time.
     * 
     * @return the current date time
     */
    public static Date getCurrentDateTime() {
        Calendar calendar = Calendar.getInstance();
        return calendar.getTime();
    }
}

Related

  1. getPassedMonthBetweenDate(Date before, Date after)
  2. getPreviousDate(String before)
  3. getQuarterStartDateBeforeCurrent(int num, Date current)
  4. getSomeDaysBeforeAfter(Date date, int days)
  5. isAtLeastOneDayBefore(Date daybefore, Date dayafter)
  6. isBefore(Date date1, Date date2)
  7. isBefore2015(Date date)
  8. isBefore_day(Date time1, Date time2, int days)
  9. isBeforeCommonEra(Date date)