public static boolean isSameDate(UTCDate date0, UTCDate date1) {
        assert date0 != null : "date0 cannot be null";
        assert date1 != null : "date1 cannot be null";
        return date0.getFullYear() == date1.getFullYear()
                && date0.getMonth() == date1.getMonth()
                && date0.getDate() == date1.getDate();
    }
Check if two dates represent the same date of the same year, even if they
have different times.

@param date0 a date
@param date1 a second date
@return true if the dates are the same
stroom-core-client-widget/src/main/java/stroom/widget/datepicker/client/CalendarUtil.java