Java Utililty Methods Calendar Compare

List of utility methods to do Calendar Compare

Description

The list of methods to do Calendar Compare are organized into topic(s).

Method

Calendarmin(final Calendar... calendars)
min
Vector<Calendar> list = new Vector<Calendar>(Arrays.asList(calendars));
Collections.sort(list);
return list.firstElement();
CalendarminCalendars(List calendars)
Returns the minimum Calendar in the Calendar list.
long min = Long.MAX_VALUE;
Calendar minCalendar = null;
for (Calendar value : calendars) {
    long v = value.getTimeInMillis();
    if (v < min) {
        min = v;
        minCalendar = value;
return minCalendar;
Calendarminimum(Calendar... calendars)
Returns the smallest datetime from the given list.
if (calendars == null || calendars.length == 0)
    return null;
return minimum(Arrays.asList(calendars));