Class DateTimeFormatUtils


  • public class DateTimeFormatUtils
    extends Object
    Utils for Datetime, since locale provider has changed from java 9. (Deprecated) Note: It's recommended to specify the VM option with -Djava.locale.providers=JRE,CLDR. Because it's not only affected to Date Time Format, other Formats may be changed as well.
    Since:
    5.5.0
    • Constructor Detail

      • DateTimeFormatUtils

        public DateTimeFormatUtils()
    • Method Detail

      • getDateInstance

        public static DateFormat getDateInstance​(int dateStyle,
                                                 Locale locale)
      • getTimeInstance

        public static DateFormat getTimeInstance​(int timeStyle,
                                                 Locale locale)
      • getDateFormat

        public static DateFormat getDateFormat​(int style,
                                               Locale locale)
        Returns the conditioned date format according to java version.
        Parameters:
        style -
        locale -
        Returns:
        dateFormat
      • getDateTimeFormat

        public static DateFormat getDateTimeFormat​(int style,
                                                   int timeStyle,
                                                   Locale locale)
        Returns the conditioned datetime format according to java version.
        Parameters:
        style -
        timeStyle -
        locale -
        Returns:
        dateFormat