@Test public void floorToTenMinutes() throws Exception { DateTime dt0 = new DateTime(2009,6,24,23,29,30,789,DateTimeZone.UTC); Assert.assertNull(DateTimeUtil.floorToTenMinutes(null)); DateTime dt1 = DateTimeUtil.floorToTenMinutes(dt0); Assert.assertEquals(2009, dt1.getYear()); Assert.assertEquals(6, dt1.getMonthOfYear()); Assert.assertEquals(24, dt1.getDayOfMonth()); Assert.assertEquals(23, dt1.getHourOfDay()); Assert.assertEquals(20, dt1.getMinuteOfHour()); Assert.assertEquals(0, dt1.getSecondOfMinute()); Assert.assertEquals(0, dt1.getMillisOfSecond()); Assert.assertEquals(DateTimeZone.UTC, dt1.getZone()); DateTime dt3 = DateTimeUtil.floorToTenMinutes(new DateTime(2009,6,24,10,0,0,0)); Assert.assertEquals(new DateTime(2009,6,24,10,0,0,0), dt3); dt3 = DateTimeUtil.floorToTenMinutes(new DateTime(2009,6,24,10,1,23,456)); Assert.assertEquals(new DateTime(2009,6,24,10,0,0,0), dt3); dt3 = DateTimeUtil.floorToTenMinutes(new DateTime(2009,6,24,10,30,12,56)); Assert.assertEquals(new DateTime(2009,6,24,10,30,0,0), dt3); dt3 = DateTimeUtil.floorToTenMinutes(new DateTime(2009,6,24,10,59,59,999)); Assert.assertEquals(new DateTime(2009,6,24,10,50,0,0), dt3); dt3 = DateTimeUtil.floorToTenMinutes(new DateTime(2009,6,24,10,55,59,999)); Assert.assertEquals(new DateTime(2009,6,24,10,50,0,0), dt3); dt3 = DateTimeUtil.floorToTenMinutes(new DateTime(2009,6,24,10,46,59,999)); Assert.assertEquals(new DateTime(2009,6,24,10,40,0,0), dt3); }
public static DateTime floorToTenMinutes(DateTime value) { return floorToMinutePeriod(value, 10); }
DateTimeUtil { public static DateTime floorToTenMinutes(DateTime value) { return floorToMinutePeriod(value, 10); } }
DateTimeUtil { public static DateTime floorToTenMinutes(DateTime value) { return floorToMinutePeriod(value, 10); }  }
DateTimeUtil { public static DateTime floorToTenMinutes(DateTime value) { return floorToMinutePeriod(value, 10); }  static DateTime toDateTime(Timestamp value); static DateTime copy(DateTime value); static Timestamp toTimestamp(DateTime dt); static DateTime now(); static DateTime parseEmbedded(String string0); static DateTime parseEmbedded(String string0, String pattern, DateTimeZone zone); static DateTime floorToYear(DateTime value); static DateTime floorToMonth(DateTime value); static DateTime floorToDay(DateTime value); static DateTime floorToHour(DateTime value); static DateTime floorToHalfHour(DateTime value); static DateTime floorToQuarterHour(DateTime value); static DateTime floorToTenMinutes(DateTime value); static DateTime floorToFiveMinutes(DateTime value); static DateTime floorToMinutePeriod(DateTime value, int periodInMinutes); static DateTime floorToMinute(DateTime value); static DateTime floorToSecond(DateTime value); }
DateTimeUtil { public static DateTime floorToTenMinutes(DateTime value) { return floorToMinutePeriod(value, 10); }  static DateTime toDateTime(Timestamp value); static DateTime copy(DateTime value); static Timestamp toTimestamp(DateTime dt); static DateTime now(); static DateTime parseEmbedded(String string0); static DateTime parseEmbedded(String string0, String pattern, DateTimeZone zone); static DateTime floorToYear(DateTime value); static DateTime floorToMonth(DateTime value); static DateTime floorToDay(DateTime value); static DateTime floorToHour(DateTime value); static DateTime floorToHalfHour(DateTime value); static DateTime floorToQuarterHour(DateTime value); static DateTime floorToTenMinutes(DateTime value); static DateTime floorToFiveMinutes(DateTime value); static DateTime floorToMinutePeriod(DateTime value, int periodInMinutes); static DateTime floorToMinute(DateTime value); static DateTime floorToSecond(DateTime value);  }