public static enum FixedDateFormat.FixedFormat extends 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_OFFSET_DATE_TIME_HH
ISO8601 time format:
"yyyy-MM-dd'T'HH:mm:ss,SSSX" with a time zone like -07 . |
ISO8601_OFFSET_DATE_TIME_HHCMM
ISO8601 time format:
"yyyy-MM-dd'T'HH:mm:ss,SSSXXX" with a time zone like -07:00 . |
ISO8601_OFFSET_DATE_TIME_HHMM
ISO8601 time format:
"yyyy-MM-dd'T'HH:mm:ss,SSSXX" with a time zone like -0700 . |
ISO8601_PERIOD
ISO8601 time format:
"yyyy-MM-dd'T'HH:mm:ss.SSS" . |
ISO8601_PERIOD_MICROS
ISO8601 time format with support for microsecond precision:
"yyyy-MM-dd'T'HH:mm:ss.nnnnnn" . |
Modifier and Type | Method and Description |
---|---|
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(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. |
FixedDateFormat.FixedTimeZoneFormat |
getFixedTimeZoneFormat()
Returns the optional time zone format.
|
int |
getLength()
Returns the length of the resulting formatted date and time strings.
|
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(String nameOrPattern)
Returns the FixedFormat with the name or pattern matching the specified string or
null if not found. |
static FixedDateFormat.FixedFormat |
valueOf(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_OFFSET_DATE_TIME_HH
"yyyy-MM-dd'T'HH:mm:ss,SSSX"
with a time zone like -07
.public static final FixedDateFormat.FixedFormat ISO8601_OFFSET_DATE_TIME_HHMM
"yyyy-MM-dd'T'HH:mm:ss,SSSXX"
with a time zone like -0700
.public static final FixedDateFormat.FixedFormat ISO8601_OFFSET_DATE_TIME_HHCMM
"yyyy-MM-dd'T'HH:mm:ss,SSSXXX"
with a time zone like -07:00
.public static final FixedDateFormat.FixedFormat ISO8601_PERIOD
"yyyy-MM-dd'T'HH:mm:ss.SSS"
.public static final FixedDateFormat.FixedFormat ISO8601_PERIOD_MICROS
"yyyy-MM-dd'T'HH:mm:ss.nnnnnn"
.public static FixedDateFormat.FixedFormat[] values()
for (FixedDateFormat.FixedFormat c : FixedDateFormat.FixedFormat.values()) System.out.println(c);
public static FixedDateFormat.FixedFormat valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getPattern()
public String getDatePattern()
public static FixedDateFormat.FixedFormat lookup(String nameOrPattern)
null
if not found.nameOrPattern
- the name or pattern to find a FixedFormat forpublic 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(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()
public FixedDateFormat.FixedTimeZoneFormat getFixedTimeZoneFormat()
Copyright © 1999-2021 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.