DateUtilsのようなものを使用できます
public boolean isSameDay(Calendar cal1, Calendar cal2) {
if (cal1 == null || cal2 == null)
return false;
return (cal1.get(Calendar.ERA) == cal2.get(Calendar.ERA)
&& cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR)
&& cal1.get(Calendar.DAY_OF_YEAR) == cal2.get(Calendar.DAY_OF_YEAR));
}
が同じ日時であるかどうかを確認することもできます。
public boolean isSameDateTime(Calendar cal1, Calendar cal2) {
// compare if is the same ERA, YEAR, DAY, HOUR, MINUTE and SECOND
return (cal1.get(Calendar.ERA) == cal2.get(Calendar.ERA)
&& cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR)
&& cal1.get(Calendar.DAY_OF_YEAR) == cal2.get(Calendar.DAY_OF_YEAR)
&& cal1.get(Calendar.HOUR_OF_DAY) == cal2.get(Calendar.HOUR_OF_DAY)
&& cal1.get(Calendar.MINUTE) == cal2.get(Calendar.MINUTE)
&& cal1.get(Calendar.SECOND) == cal2.get(Calendar.SECOND));
}