Class DateTimeHelper


  • public class DateTimeHelper
    extends java.lang.Object
    Utility class to format and parse dates and timestamps.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String format​(long millis)
      Formats the given time in milliseconds using ISO date/time format.
      static java.lang.String format​(long millis, java.lang.String format)
      Formats the given time in milliseconds using the given format.
      static long parse​(java.lang.String string)
      Parses the given string using ISO date/time format.
      static long parse​(java.lang.String string, java.lang.String format)
      Parses the given string using the given format.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • format

        public static java.lang.String format​(long millis,
                                              java.lang.String format)
        Formats the given time in milliseconds using the given format.
      • format

        public static java.lang.String format​(long millis)
        Formats the given time in milliseconds using ISO date/time format.
      • parse

        public static long parse​(java.lang.String string,
                                 java.lang.String format)
        Parses the given string using the given format.
      • parse

        public static long parse​(java.lang.String string)
        Parses the given string using ISO date/time format.