Java Utililty Methods Date Compare by Day

List of utility methods to do Date Compare by Day

Description

The list of methods to do Date Compare by Day are organized into topic(s).

Method

booleansameDay(int firstDate, int secondDate)
same Day
Calendar c1 = Calendar.getInstance();
Calendar c2 = Calendar.getInstance();
c1.setTimeInMillis(firstDate * 1000L);
c2.setTimeInMillis(secondDate * 1000L);
return (c1.get(Calendar.YEAR) == c2.get(Calendar.YEAR))
        && (c1.get(Calendar.DAY_OF_YEAR) == c2.get(Calendar.DAY_OF_YEAR));