Java Utililty Methods Date After

List of utility methods to do Date After

Description

The list of methods to do Date After are organized into topic(s).

Method

booleanisDateAfter(Date date1, Date date2)
is Date After
Calendar cal1 = Calendar.getInstance();
Calendar cal2 = Calendar.getInstance();
cal1.setTime(date1);
cal2.setTime(date2);
return cal1.after(cal2);
booleanisEqualOrAfterTomorrow(Date d)
Returns true if the given date equals or is after tomorrow (ignoring the time)
return (d != null && !d.before(getTomorrow()));
booleanisInSameDayOrAfter(Date d1, Date d2)
is In Same Day Or After
if (d1 == null || d2 == null)
    return false;
if (isInSameDay(d1, d2) || d1.after(d2))
    return true;
return false;
booleanisNotAfter(Date sDate, Date eDate)
is Not After
return (sDate.compareTo(eDate) == 0 || before(sDate, eDate));
booleanisTimeAfter(Date time1, Date time2)
is Time After
Calendar calendar1 = Calendar.getInstance();
calendar1.setTime(time1);
calendar1.set(1900, 1, 1);
Calendar calendar2 = Calendar.getInstance();
calendar2.setTime(time2);
calendar2.set(1900, 1, 1);
return calendar1.after(calendar2);