Java Date After isNotAfter(Date sDate, Date eDate)

Here you can find the source of isNotAfter(Date sDate, Date eDate)

Description

is Not After

License

Open Source License

Declaration

public static boolean isNotAfter(Date sDate, Date eDate) 

Method Source Code

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

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

public class Main {

    public static boolean isNotAfter(Date sDate, Date eDate) {
        return (sDate.compareTo(eDate) == 0 || before(sDate, eDate));
    }//from w ww .j  av  a 2  s  .c  o m

    public static boolean before(Date sDate, Date eDate) {
        Calendar sCal = new GregorianCalendar();
        sCal.setTime(sDate);
        Calendar eCal = new GregorianCalendar();
        eCal.setTime(eDate);
        return sCal.before(eCal);
    }
}

Related

  1. isAfterHour(Date source, int hour)
  2. isAfterToday(Date dag)
  3. isDateAfter(Date date1, Date date2)
  4. isEqualOrAfterTomorrow(Date d)
  5. isInSameDayOrAfter(Date d1, Date d2)
  6. isTimeAfter(Date time1, Date time2)