Class ConfigurableDateFormatter


  • public class ConfigurableDateFormatter
    extends Object
    A configurable date / date and time formatter utility. Although the formatters can be accessed in a static way, the configuration is done through a concrete instance of this utility class. Make sure it is treated like a singleton, otherwise, the last configuration / instance overwrites the static values being set before.
    • Constructor Detail

      • ConfigurableDateFormatter

        public ConfigurableDateFormatter()
    • Method Detail

      • setSimpleFormat

        public static void setSimpleFormat​(String simpleFormat)
      • setSimpleFormatUS

        public static void setSimpleFormatUS​(String simpleFormatUS)
      • setTimeZone

        public static void setTimeZone​(ZoneId timeZone)
      • setTimeZone

        public static void setTimeZone​(String timeZone)
      • getTimeZone

        public ZoneId getTimeZone()
      • parseFromISO8601Format

        public static Instant parseFromISO8601Format​(String date)
      • formatInISO8601Format

        public static String formatInISO8601Format​(Date date)
      • formatInISO8601Format

        public static String formatInISO8601Format​(Instant instant)
      • formatInSimpleFormat

        public static String formatInSimpleFormat​(Date date)
      • formatInSimpleFormatUS

        public static String formatInSimpleFormatUS​(Date date)