test_class.file: herd-code/herd-core/src/test/java/org/finra/herd/core/HerdDateUtilsTest.java
test_class.identifier: HerdDateUtilsTest
test_class.superclass: extends AbstractCoreTest
test_case.body: @Test
      public void testFormatDurationZeroMilliseconds()
      {
          String result = HerdDateUtils.formatDuration(0);
          assertEquals("0 Milliseconds", result);
      }
test_case.class_method_signature: HerdDateUtilsTest.testFormatDurationZeroMilliseconds()
test_case.full_signature: @Test public void testFormatDurationZeroMilliseconds()
test_case.identifier: testFormatDurationZeroMilliseconds
test_case.invocations: formatDuration assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFormatDurationZeroMilliseconds()
focal_class.file: herd-code/herd-core/src/main/java/org/finra/herd/core/HerdDateUtils.java
focal_class.identifier: HerdDateUtils
focal_class.class_method_signature: HerdDateUtils.getCurrentCalendarNoTime()
focal_class.full_signature: public static Calendar getCurrentCalendarNoTime()
focal_class.identifier: getCurrentCalendarNoTime
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Calendar
focal_class.signature: Calendar getCurrentCalendarNoTime()
focal_class.class_method_signature: HerdDateUtils.formatDuration(long duration)
focal_class.full_signature: public static String formatDuration(long duration)
focal_class.identifier: formatDuration
focal_class.modifiers: public static
focal_class.parameters: (long duration)
focal_class.return: String
focal_class.signature: String formatDuration(long duration)
focal_class.class_method_signature: HerdDateUtils.processDuration(long remainingDuration, long millisPerDuration, String durationName, StringBuilder result, boolean displayZeroDuration)
focal_class.full_signature: private static long processDuration(long remainingDuration, long millisPerDuration, String durationName, StringBuilder result, boolean displayZeroDuration)
focal_class.identifier: processDuration
focal_class.modifiers: private static
focal_class.parameters: (long remainingDuration, long millisPerDuration, String durationName, StringBuilder result, boolean displayZeroDuration)
focal_class.return: long
focal_class.signature: long processDuration(long remainingDuration, long millisPerDuration, String durationName, StringBuilder result, boolean displayZeroDuration)
focal_class.class_method_signature: HerdDateUtils.now()
focal_class.full_signature: public static XMLGregorianCalendar now()
focal_class.identifier: now
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: XMLGregorianCalendar
focal_class.signature: XMLGregorianCalendar now()
focal_class.class_method_signature: HerdDateUtils.getXMLGregorianCalendarValue(Date date)
focal_class.full_signature: public static XMLGregorianCalendar getXMLGregorianCalendarValue(Date date)
focal_class.identifier: getXMLGregorianCalendarValue
focal_class.modifiers: public static
focal_class.parameters: (Date date)
focal_class.return: XMLGregorianCalendar
focal_class.signature: XMLGregorianCalendar getXMLGregorianCalendarValue(Date date)
focal_class.class_method_signature: HerdDateUtils.addDays(Timestamp timestamp, int amount)
focal_class.full_signature: public static Timestamp addDays(Timestamp timestamp, int amount)
focal_class.identifier: addDays
focal_class.modifiers: public static
focal_class.parameters: (Timestamp timestamp, int amount)
focal_class.return: Timestamp
focal_class.signature: Timestamp addDays(Timestamp timestamp, int amount)
focal_class.class_method_signature: HerdDateUtils.addMinutes(Timestamp timestamp, int amount)
focal_class.full_signature: public static Timestamp addMinutes(Timestamp timestamp, int amount)
focal_class.identifier: addMinutes
focal_class.modifiers: public static
focal_class.parameters: (Timestamp timestamp, int amount)
focal_class.return: Timestamp
focal_class.signature: Timestamp addMinutes(Timestamp timestamp, int amount)
focal_class.class_method_signature: HerdDateUtils.resetTimeToMidnight(XMLGregorianCalendar xmlGregorianCalendar)
focal_class.full_signature: public static Timestamp resetTimeToMidnight(XMLGregorianCalendar xmlGregorianCalendar)
focal_class.identifier: resetTimeToMidnight
focal_class.modifiers: public static
focal_class.parameters: (XMLGregorianCalendar xmlGregorianCalendar)
focal_class.return: Timestamp
focal_class.signature: Timestamp resetTimeToMidnight(XMLGregorianCalendar xmlGregorianCalendar)
focal_class.class_method_signature: HerdDateUtils.convertToTimestamp(XMLGregorianCalendar xmlGregorianCalendar)
focal_class.full_signature: public static Timestamp convertToTimestamp(XMLGregorianCalendar xmlGregorianCalendar)
focal_class.identifier: convertToTimestamp
focal_class.modifiers: public static
focal_class.parameters: (XMLGregorianCalendar xmlGregorianCalendar)
focal_class.return: Timestamp
focal_class.signature: Timestamp convertToTimestamp(XMLGregorianCalendar xmlGregorianCalendar)
focal_class.class_method_signature: HerdDateUtils.containsTimePortion(XMLGregorianCalendar xmlGregorianCalendar)
focal_class.full_signature: public static Boolean containsTimePortion(XMLGregorianCalendar xmlGregorianCalendar)
focal_class.identifier: containsTimePortion
focal_class.modifiers: public static
focal_class.parameters: (XMLGregorianCalendar xmlGregorianCalendar)
focal_class.return: Boolean
focal_class.signature: Boolean containsTimePortion(XMLGregorianCalendar xmlGregorianCalendar)
focal_class.superclass: extends DateUtils
focal_method.body: public static String formatDuration(long duration)
      {
          // Initialize the result string.
          StringBuilder result = new StringBuilder();
  
          // Since we have to display the readable duration, append it initially.
  
          long remainingDuration = duration;
  
          // If the duration is 0, then just return 0 milliseconds.
          if (remainingDuration == 0)
          {
              result.append("0 Milliseconds");
          }
          else
          {
              // Compute each duration separately.
              remainingDuration = processDuration(remainingDuration, MILLIS_PER_DAY, "Day", result, false);
              remainingDuration = processDuration(remainingDuration, MILLIS_PER_HOUR, "Hour", result, false);
              remainingDuration = processDuration(remainingDuration, MILLIS_PER_MINUTE, "Minute", result, false);
              remainingDuration = processDuration(remainingDuration, MILLIS_PER_SECOND, "Second", result, false);
  
              // Compute the milliseconds.
              long milliSeconds = remainingDuration;
              if (milliSeconds > 0)
              {
                  // Just display the final millisecond portion no matter what (i.e. the duration is 1).
                  processDuration(remainingDuration, 1, "Millisecond", result, true);
              }
          }
  
          // Return the result.
          return result.toString();
      }
focal_method.class_method_signature: HerdDateUtils.formatDuration(long duration)
focal_method.full_signature: public static String formatDuration(long duration)
focal_method.identifier: formatDuration
focal_method.invocations: append processDuration processDuration processDuration processDuration processDuration toString
focal_method.modifiers: public static
focal_method.parameters: (long duration)
focal_method.return: String
focal_method.signature: String formatDuration(long duration)