Enum FixedDateFormat.FixedFormat

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ABSOLUTE
      ABSOLUTE time format: "HH:mm:ss,SSS".
      ABSOLUTE_MICROS
      ABSOLUTE time format with microsecond precision: "HH:mm:ss,nnnnnn".
      ABSOLUTE_NANOS
      ABSOLUTE time format with nanosecond precision: "HH:mm:ss,nnnnnnnnn".
      ABSOLUTE_PERIOD
      ABSOLUTE time format variation with period separator: "HH:mm:ss.SSS".
      COMPACT
      COMPACT time format: "yyyyMMddHHmmssSSS".
      DATE
      DATE_AND_TIME time format: "dd MMM yyyy HH:mm:ss,SSS".
      DATE_PERIOD
      DATE_AND_TIME time format variation with period separator: "dd MMM yyyy HH:mm:ss.SSS".
      DEFAULT
      DEFAULT time format: "yyyy-MM-dd HH:mm:ss,SSS".
      DEFAULT_MICROS
      DEFAULT time format with microsecond precision: "yyyy-MM-dd HH:mm:ss,nnnnnn".
      DEFAULT_NANOS
      DEFAULT time format with nanosecond precision: "yyyy-MM-dd HH:mm:ss,nnnnnnnnn".
      DEFAULT_PERIOD
      DEFAULT time format variation with period separator: "yyyy-MM-dd HH:mm:ss.SSS".
      ISO8601
      ISO8601 time format: "yyyy-MM-dd'T'HH:mm:ss,SSS".
      ISO8601_BASIC
      ISO8601_BASIC time format: "yyyyMMdd'T'HHmmss,SSS".
      ISO8601_BASIC_PERIOD
      ISO8601_BASIC time format: "yyyyMMdd'T'HHmmss.SSS".
      ISO8601_PERIOD
      ISO8601 time format: "yyyy-MM-dd'T'HH:mm:ss.SSS".
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDatePattern()
      Returns the date part of the pattern.
      int getDatePatternLength()
      Returns the length of the date part of the resulting formatted string.
      FastDateFormat getFastDateFormat()
      Returns the FastDateFormat object for formatting the date part of the pattern or null if the pattern does not have a date part.
      FastDateFormat getFastDateFormat​(java.util.TimeZone tz)
      Returns the FastDateFormat object for formatting the date part of the pattern or null if the pattern does not have a date part.
      int getLength()
      Returns the length of the resulting formatted date and time strings.
      java.lang.String getPattern()
      Returns the full pattern.
      int getSecondFractionDigits()
      Returns the number of digits specifying the fraction of the second to show
      static FixedDateFormat.FixedFormat lookup​(java.lang.String nameOrPattern)
      Returns the FixedFormat with the name or pattern matching the specified string or null if not found.
      static FixedDateFormat.FixedFormat valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static FixedDateFormat.FixedFormat[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        public static FixedDateFormat.FixedFormat[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (FixedDateFormat.FixedFormat c : FixedDateFormat.FixedFormat.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FixedDateFormat.FixedFormat valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getPattern

        public java.lang.String getPattern()
        Returns the full pattern.
        Returns:
        the full pattern
      • getDatePattern

        public java.lang.String getDatePattern()
        Returns the date part of the pattern.
        Returns:
        the date part of the pattern
      • lookup

        public static FixedDateFormat.FixedFormat lookup​(java.lang.String nameOrPattern)
        Returns the FixedFormat with the name or pattern matching the specified string or null if not found.
        Parameters:
        nameOrPattern - the name or pattern to find a FixedFormat for
        Returns:
        the FixedFormat with the name or pattern matching the specified string
      • getLength

        public int getLength()
        Returns the length of the resulting formatted date and time strings.
        Returns:
        the length of the resulting formatted date and time strings
      • getDatePatternLength

        public int getDatePatternLength()
        Returns the length of the date part of the resulting formatted string.
        Returns:
        the length of the date part of the resulting formatted string
      • getFastDateFormat

        public FastDateFormat getFastDateFormat()
        Returns the FastDateFormat object for formatting the date part of the pattern or null if the pattern does not have a date part.
        Returns:
        the FastDateFormat object for formatting the date part of the pattern or null
      • getFastDateFormat

        public FastDateFormat getFastDateFormat​(java.util.TimeZone tz)
        Returns the FastDateFormat object for formatting the date part of the pattern or null if the pattern does not have a date part.
        Parameters:
        tz - the time zone to use
        Returns:
        the FastDateFormat object for formatting the date part of the pattern or null
      • getSecondFractionDigits

        public int getSecondFractionDigits()
        Returns the number of digits specifying the fraction of the second to show
        Returns:
        3 for millisecond precision, 6 for microsecond precision or 9 for nanosecond precision