List of utility methods to do Day Compare
boolean | sameDay(Date date1, Date date2) same Day if (date1 == null || date2 == null) throw new IllegalArgumentException("'date1' or 'date2' was null"); Calendar c1 = Calendar.getInstance(); c1.setTime(date1); Calendar c2 = Calendar.getInstance(); c2.setTime(date2); return c1.get(Calendar.YEAR) == c2.get(Calendar.YEAR) && c1.get(Calendar.DAY_OF_YEAR) == c2.get(Calendar.DAY_OF_YEAR); ... |