public static enum FixedDateFormat.FixedFormat extends java.lang.Enum<FixedDateFormat.FixedFormat>
Package protected for unit tests.
Enum Constant and 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" . |
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
datePattern |
private static java.lang.String |
DEFAULT_SECOND_FRACTION_PATTERN |
private int |
escapeCount |
private static int |
MILLI_FRACTION_DIGITS |
private char |
millisSeparatorChar |
private int |
millisSeparatorLength |
private java.lang.String |
pattern |
private static char |
SECOND_FRACTION_PATTERN |
private int |
secondFractionDigits |
private char |
timeSeparatorChar |
private int |
timeSeparatorLength |
Modifier and Type | Method and 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. |
(package private) static FixedDateFormat.FixedFormat |
lookupIgnoringNanos(java.lang.String pattern) |
private static int |
nanoStart(java.lang.String pattern) |
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.
|
public static final FixedDateFormat.FixedFormat ABSOLUTE
"HH:mm:ss,SSS"
.public static final FixedDateFormat.FixedFormat ABSOLUTE_MICROS
"HH:mm:ss,nnnnnn"
.public static final FixedDateFormat.FixedFormat ABSOLUTE_NANOS
"HH:mm:ss,nnnnnnnnn"
.public static final FixedDateFormat.FixedFormat ABSOLUTE_PERIOD
"HH:mm:ss.SSS"
.public static final FixedDateFormat.FixedFormat COMPACT
"yyyyMMddHHmmssSSS"
.public static final FixedDateFormat.FixedFormat DATE
"dd MMM yyyy HH:mm:ss,SSS"
.public static final FixedDateFormat.FixedFormat DATE_PERIOD
"dd MMM yyyy HH:mm:ss.SSS"
.public static final FixedDateFormat.FixedFormat DEFAULT
"yyyy-MM-dd HH:mm:ss,SSS"
.public static final FixedDateFormat.FixedFormat DEFAULT_MICROS
"yyyy-MM-dd HH:mm:ss,nnnnnn"
.public static final FixedDateFormat.FixedFormat DEFAULT_NANOS
"yyyy-MM-dd HH:mm:ss,nnnnnnnnn"
.public static final FixedDateFormat.FixedFormat DEFAULT_PERIOD
"yyyy-MM-dd HH:mm:ss.SSS"
.public static final FixedDateFormat.FixedFormat ISO8601_BASIC
"yyyyMMdd'T'HHmmss,SSS"
.public static final FixedDateFormat.FixedFormat ISO8601_BASIC_PERIOD
"yyyyMMdd'T'HHmmss.SSS"
.public static final FixedDateFormat.FixedFormat ISO8601
"yyyy-MM-dd'T'HH:mm:ss,SSS"
.public static final FixedDateFormat.FixedFormat ISO8601_PERIOD
"yyyy-MM-dd'T'HH:mm:ss.SSS"
.private static final java.lang.String DEFAULT_SECOND_FRACTION_PATTERN
private static final int MILLI_FRACTION_DIGITS
private static final char SECOND_FRACTION_PATTERN
private final java.lang.String pattern
private final java.lang.String datePattern
private final int escapeCount
private final char timeSeparatorChar
private final int timeSeparatorLength
private final char millisSeparatorChar
private final int millisSeparatorLength
private final int secondFractionDigits
public static FixedDateFormat.FixedFormat[] values()
for (FixedDateFormat.FixedFormat c : FixedDateFormat.FixedFormat.values()) System.out.println(c);
public static FixedDateFormat.FixedFormat valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String getPattern()
public java.lang.String getDatePattern()
public static FixedDateFormat.FixedFormat lookup(java.lang.String nameOrPattern)
null
if not found.nameOrPattern
- the name or pattern to find a FixedFormat forstatic FixedDateFormat.FixedFormat lookupIgnoringNanos(java.lang.String pattern)
private static int nanoStart(java.lang.String pattern)
public int getLength()
public int getDatePatternLength()
public FastDateFormat getFastDateFormat()
FastDateFormat
object for formatting the date part of the pattern or null
if the
pattern does not have a date part.FastDateFormat
object for formatting the date part of the pattern or null
public FastDateFormat getFastDateFormat(java.util.TimeZone tz)
FastDateFormat
object for formatting the date part of the pattern or null
if the
pattern does not have a date part.tz
- the time zone to useFastDateFormat
object for formatting the date part of the pattern or null
public int getSecondFractionDigits()