Android Utililty Methods Date Equal

List of utility methods to do Date Equal

Description

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

Method

booleanequal(Date date1, Date date2)
equal
return dateFormater.format(date1)
        .equals(dateFormater.format(date2));
booleanisSameInstant(Date date1, Date date2)

Checks if two date objects represent the same instant in time.

This method compares the long millisecond time of the two objects.

if (date1 == null || date2 == null) {
    throw new IllegalArgumentException("The date must not be null");
return date1.getTime() == date2.getTime();