test_class.declarator: logger = LoggerFactory.getLogger(DateTimeUtilTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger logger = LoggerFactory.getLogger(DateTimeUtilTest.class);
test_class.type: Logger
test_class.var_name: logger
test_class.file: ch-commons-util/src/test/java/com/cloudhopper/commons/util/DateTimeUtilTest.java
test_class.identifier: DateTimeUtilTest
test_case.body: @Test
      public void floorToHalfHour() throws Exception {
          // create a reference datetime
          DateTime dt0 = new DateTime(2009,6,24,23,29,30,789,DateTimeZone.UTC);
  
          Assert.assertNull(DateTimeUtil.floorToHalfHour(null));
          
          // floor to nearest half hour
          DateTime dt1 = DateTimeUtil.floorToHalfHour(dt0);
  
          Assert.assertEquals(2009, dt1.getYear());
          Assert.assertEquals(6, dt1.getMonthOfYear());
          Assert.assertEquals(24, dt1.getDayOfMonth());
          Assert.assertEquals(23, dt1.getHourOfDay());
          Assert.assertEquals(0, dt1.getMinuteOfHour());
          Assert.assertEquals(0, dt1.getSecondOfMinute());
          Assert.assertEquals(0, dt1.getMillisOfSecond());
          Assert.assertEquals(DateTimeZone.UTC, dt1.getZone());
  
          DateTime dt3 = DateTimeUtil.floorToHalfHour(new DateTime(2009,6,24,10,0,0,0));
          Assert.assertEquals(new DateTime(2009,6,24,10,0,0,0), dt3);
  
          dt3 = DateTimeUtil.floorToHalfHour(new DateTime(2009,6,24,10,1,23,456));
          Assert.assertEquals(new DateTime(2009,6,24,10,0,0,0), dt3);
  
          dt3 = DateTimeUtil.floorToHalfHour(new DateTime(2009,6,24,10,30,12,56));
          Assert.assertEquals(new DateTime(2009,6,24,10,30,0,0), dt3);
  
          dt3 = DateTimeUtil.floorToHalfHour(new DateTime(2009,6,24,10,59,59,999));
          Assert.assertEquals(new DateTime(2009,6,24,10,30,0,0), dt3);
  
          dt3 = DateTimeUtil.floorToHalfHour(new DateTime(2009,6,24,10,55,59,999));
          Assert.assertEquals(new DateTime(2009,6,24,10,30,0,0), dt3);
  
          dt3 = DateTimeUtil.floorToHalfHour(new DateTime(2009,6,24,10,46,59,999));
          Assert.assertEquals(new DateTime(2009,6,24,10,30,0,0), dt3);
      }
test_case.class_method_signature: DateTimeUtilTest.floorToHalfHour()
test_case.full_signature: @Test public void floorToHalfHour()
test_case.identifier: floorToHalfHour
test_case.invocations: assertNull floorToHalfHour floorToHalfHour assertEquals getYear assertEquals getMonthOfYear assertEquals getDayOfMonth assertEquals getHourOfDay assertEquals getMinuteOfHour assertEquals getSecondOfMinute assertEquals getMillisOfSecond assertEquals getZone floorToHalfHour assertEquals floorToHalfHour assertEquals floorToHalfHour assertEquals floorToHalfHour assertEquals floorToHalfHour assertEquals floorToHalfHour assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void floorToHalfHour()
focal_class.file: ch-commons-util/src/main/java/com/cloudhopper/commons/util/DateTimeUtil.java
focal_class.identifier: DateTimeUtil
focal_class.class_method_signature: DateTimeUtil.toDateTime(Timestamp value)
focal_class.full_signature: public static DateTime toDateTime(Timestamp value)
focal_class.identifier: toDateTime
focal_class.modifiers: public static
focal_class.parameters: (Timestamp value)
focal_class.return: DateTime
focal_class.signature: DateTime toDateTime(Timestamp value)
focal_class.class_method_signature: DateTimeUtil.copy(DateTime value)
focal_class.full_signature: public static DateTime copy(DateTime value)
focal_class.identifier: copy
focal_class.modifiers: public static
focal_class.parameters: (DateTime value)
focal_class.return: DateTime
focal_class.signature: DateTime copy(DateTime value)
focal_class.class_method_signature: DateTimeUtil.toTimestamp(DateTime dt)
focal_class.full_signature: public static Timestamp toTimestamp(DateTime dt)
focal_class.identifier: toTimestamp
focal_class.modifiers: public static
focal_class.parameters: (DateTime dt)
focal_class.return: Timestamp
focal_class.signature: Timestamp toTimestamp(DateTime dt)
focal_class.class_method_signature: DateTimeUtil.now()
focal_class.full_signature: public static DateTime now()
focal_class.identifier: now
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: DateTime
focal_class.signature: DateTime now()
focal_class.class_method_signature: DateTimeUtil.parseEmbedded(String string0)
focal_class.full_signature: public static DateTime parseEmbedded(String string0)
focal_class.identifier: parseEmbedded
focal_class.modifiers: public static
focal_class.parameters: (String string0)
focal_class.return: DateTime
focal_class.signature: DateTime parseEmbedded(String string0)
focal_class.class_method_signature: DateTimeUtil.parseEmbedded(String string0, String pattern, DateTimeZone zone)
focal_class.full_signature: public static DateTime parseEmbedded(String string0, String pattern, DateTimeZone zone)
focal_class.identifier: parseEmbedded
focal_class.modifiers: public static
focal_class.parameters: (String string0, String pattern, DateTimeZone zone)
focal_class.return: DateTime
focal_class.signature: DateTime parseEmbedded(String string0, String pattern, DateTimeZone zone)
focal_class.class_method_signature: DateTimeUtil.floorToYear(DateTime value)
focal_class.full_signature: public static DateTime floorToYear(DateTime value)
focal_class.identifier: floorToYear
focal_class.modifiers: public static
focal_class.parameters: (DateTime value)
focal_class.return: DateTime
focal_class.signature: DateTime floorToYear(DateTime value)
focal_class.class_method_signature: DateTimeUtil.floorToMonth(DateTime value)
focal_class.full_signature: public static DateTime floorToMonth(DateTime value)
focal_class.identifier: floorToMonth
focal_class.modifiers: public static
focal_class.parameters: (DateTime value)
focal_class.return: DateTime
focal_class.signature: DateTime floorToMonth(DateTime value)
focal_class.class_method_signature: DateTimeUtil.floorToDay(DateTime value)
focal_class.full_signature: public static DateTime floorToDay(DateTime value)
focal_class.identifier: floorToDay
focal_class.modifiers: public static
focal_class.parameters: (DateTime value)
focal_class.return: DateTime
focal_class.signature: DateTime floorToDay(DateTime value)
focal_class.class_method_signature: DateTimeUtil.floorToHour(DateTime value)
focal_class.full_signature: public static DateTime floorToHour(DateTime value)
focal_class.identifier: floorToHour
focal_class.modifiers: public static
focal_class.parameters: (DateTime value)
focal_class.return: DateTime
focal_class.signature: DateTime floorToHour(DateTime value)
focal_class.class_method_signature: DateTimeUtil.floorToHalfHour(DateTime value)
focal_class.full_signature: public static DateTime floorToHalfHour(DateTime value)
focal_class.identifier: floorToHalfHour
focal_class.modifiers: public static
focal_class.parameters: (DateTime value)
focal_class.return: DateTime
focal_class.signature: DateTime floorToHalfHour(DateTime value)
focal_class.class_method_signature: DateTimeUtil.floorToQuarterHour(DateTime value)
focal_class.full_signature: public static DateTime floorToQuarterHour(DateTime value)
focal_class.identifier: floorToQuarterHour
focal_class.modifiers: public static
focal_class.parameters: (DateTime value)
focal_class.return: DateTime
focal_class.signature: DateTime floorToQuarterHour(DateTime value)
focal_class.class_method_signature: DateTimeUtil.floorToTenMinutes(DateTime value)
focal_class.full_signature: public static DateTime floorToTenMinutes(DateTime value)
focal_class.identifier: floorToTenMinutes
focal_class.modifiers: public static
focal_class.parameters: (DateTime value)
focal_class.return: DateTime
focal_class.signature: DateTime floorToTenMinutes(DateTime value)
focal_class.class_method_signature: DateTimeUtil.floorToFiveMinutes(DateTime value)
focal_class.full_signature: public static DateTime floorToFiveMinutes(DateTime value)
focal_class.identifier: floorToFiveMinutes
focal_class.modifiers: public static
focal_class.parameters: (DateTime value)
focal_class.return: DateTime
focal_class.signature: DateTime floorToFiveMinutes(DateTime value)
focal_class.class_method_signature: DateTimeUtil.floorToMinutePeriod(DateTime value, int periodInMinutes)
focal_class.full_signature: public static DateTime floorToMinutePeriod(DateTime value, int periodInMinutes)
focal_class.identifier: floorToMinutePeriod
focal_class.modifiers: public static
focal_class.parameters: (DateTime value, int periodInMinutes)
focal_class.return: DateTime
focal_class.signature: DateTime floorToMinutePeriod(DateTime value, int periodInMinutes)
focal_class.class_method_signature: DateTimeUtil.floorToMinute(DateTime value)
focal_class.full_signature: public static DateTime floorToMinute(DateTime value)
focal_class.identifier: floorToMinute
focal_class.modifiers: public static
focal_class.parameters: (DateTime value)
focal_class.return: DateTime
focal_class.signature: DateTime floorToMinute(DateTime value)
focal_class.class_method_signature: DateTimeUtil.floorToSecond(DateTime value)
focal_class.full_signature: public static DateTime floorToSecond(DateTime value)
focal_class.identifier: floorToSecond
focal_class.modifiers: public static
focal_class.parameters: (DateTime value)
focal_class.return: DateTime
focal_class.signature: DateTime floorToSecond(DateTime value)
focal_method.body: public static DateTime floorToHalfHour(DateTime value) {
          return floorToMinutePeriod(value, 30);
      }
focal_method.class_method_signature: DateTimeUtil.floorToHalfHour(DateTime value)
focal_method.full_signature: public static DateTime floorToHalfHour(DateTime value)
focal_method.identifier: floorToHalfHour
focal_method.invocations: floorToMinutePeriod
focal_method.modifiers: public static
focal_method.parameters: (DateTime value)
focal_method.return: DateTime
focal_method.signature: DateTime floorToHalfHour(DateTime value)