### Question:
TimeUtils { public static boolean onSameDay(DateTime dt1, DateTime dt2) { dt2 = dt2.withZone(dt1.getZone()); boolean onSameDay = dt1.getYear() == dt2.getYear() && dt1.getMonthOfYear() == dt2.getMonthOfYear() && dt1.getDayOfMonth() == dt2.getDayOfMonth(); return onSameDay; } private  TimeUtils(); static String dateTimeToISO8601(DateTime dateTime); static DateTime iso8601ToDateTime(String isoDateTime, Chronology chronology); static int findTimeIndex(List<DateTime> dtList, DateTime target); static String formatUtcIsoTimeOnly(DateTime dateTime); static String formatUtcTimeOnly(DateTime dateTime); static String formatUtcHumanReadableDateTime(DateTime dateTime); static String formatUtcDateOnly(DateTime dateTime); static String getTimeStringForCapabilities(List<DateTime> times); static String getPeriodString(long period); static Extent<DateTime> getTimeRangeForString(String timeString, Chronology chronology); static boolean onSameDay(DateTime dt1, DateTime dt2); static int getUnitLengthSeconds(String unit); static final Comparator<DateTime> TIME_POSITION_COMPARATOR; }### Answer:
@Test public void testOnSameDay() { DateTime dt1; dt1 = new DateTime(2013, 2, 27, 14, 34, DateTimeZone.UTC); DateTime dt2; dt2 = new DateTime(2013, 2, 28, 3, 34, DateTimeZone.forOffsetHours(4)); assertTrue(TimeUtils.onSameDay(dt1, dt2)); dt2 = new DateTime(2013, 2, 27, 9, 34, DateTimeZone.forOffsetHours(4)); assertTrue(TimeUtils.onSameDay(dt1, dt2)); dt2 = new DateTime(2013, 2, 27, 23, 34, DateTimeZone.forOffsetHours(-2)); assertFalse(TimeUtils.onSameDay(dt1, dt2)); dt1 = new DateTime(2013, 2, 28, 14, 34); dt2 = new DateTime(2013, 2, 28, 10, 34); assertTrue(TimeUtils.onSameDay(dt1, dt2)); dt1 = new DateTime(2013, 2, 25, 14, 34); dt2 = new DateTime(2013, 2, 28, 10, 34); assertFalse(TimeUtils.onSameDay(dt1, dt2)); }