java.util.Date types.
Supports the configuration of an explicit date time pattern, timezone, locale, and fallback date time patterns for lenient parsing.
SimpleDateFormat
| Modifier and Type | Field and Description |
|---|---|
| private String[] | |
| private DateTimeFormat. | |
| private static final Map | |
| private boolean | |
| private String | |
| private Object | |
| private int | |
| private String | |
| private TimeZone | |
| private static final TimeZone |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private DateFormat | |
| private DateFormat | |
| protected DateFormat | |
| private int | |
| public Date | parse(String
the text string text, Locale the current user locale locale)Implements org. |
| public String | print(Date
the instance to print date, Locale the current user locale locale)Implements org. |
| public void | setFallbackPatterns(String...
the fallback parsing patterns fallbackPatterns)Set additional patterns to use as a fallback in case parsing fails for the configured pattern, ISO format, style, or style pattern. |
| public void | |
| public void | |
| public void | |
| public void | setSource(Object
the source of the configuration source)Set the source of the configuration for this |
| public void | |
| public void | setStylePattern(String
two characters from the set {"S", "M", "L", "F", "-"} stylePattern)Set the two characters to use to format date values. |
| public void | |
| private IllegalStateException |
| fallbackPatterns | back to summary |
|---|---|
| private String[] fallbackPatterns
| |
| iso | back to summary |
|---|---|
| private DateTimeFormat. | |
| ISO_PATTERNS | back to summary |
|---|---|
| private static final Map<DateTimeFormat. | |
| lenient | back to summary |
|---|---|
| private boolean lenient | |
| pattern | back to summary |
|---|---|
| private String pattern
| |
| source | back to summary |
|---|---|
| private Object source
| |
| style | back to summary |
|---|---|
| private int style | |
| stylePattern | back to summary |
|---|---|
| private String stylePattern
| |
| timeZone | back to summary |
|---|---|
| private TimeZone timeZone
| |
| UTC | back to summary |
|---|---|
| private static final TimeZone UTC | |
| DateFormatter | back to summary |
|---|---|
| public DateFormatter() Create a new default | |
| DateFormatter | back to summary |
|---|---|
| public DateFormatter(String pattern) Create a new | |
| configureDateFormat | back to summary |
|---|---|
| private DateFormat configureDateFormat(DateFormat dateFormat) | |
| createDateFormat | back to summary |
|---|---|
| private DateFormat createDateFormat(Locale locale) | |
| getDateFormat | back to summary |
|---|---|
| protected DateFormat getDateFormat(Locale locale) | |
| getStylePatternForChar | back to summary |
|---|---|
| private int getStylePatternForChar(int index) | |
| parse | back to summary |
|---|---|
| public Date parse(String text, Locale locale) throws ParseException Implements org. Doc from org. Parse a text String to produce a T.
| |
| back to summary | |
|---|---|
| public String print(Date date, Locale locale) Implements org. Doc from org. Print the object of type T for display. | |
| setFallbackPatterns | back to summary |
|---|---|
| public void setFallbackPatterns(String... fallbackPatterns) Set additional patterns to use as a fallback in case parsing fails for the configured pattern, ISO format, style, or style pattern.
| |
| setIso | back to summary |
|---|---|
| public void setIso(DateTimeFormat. Set the ISO format to use to format date values.
| |
| setLenient | back to summary |
|---|---|
| public void setLenient(boolean lenient) Specify whether parsing is to be lenient. Default is With lenient parsing, the parser may allow inputs that do not precisely match the format. With strict parsing, inputs must match the format exactly. | |
| setPattern | back to summary |
|---|---|
| public void setPattern(String pattern) Set the pattern to use to format date values. If not specified, DateFormat's default style will be used. | |
| setSource | back to summary |
|---|---|
| public void setSource(Object source) Set the source of the configuration for this The supplied source object will only be used for descriptive purposes
by invoking its
| |
| setStyle | back to summary |
|---|---|
| public void setStyle(int style) Set the If not specified, DateFormat's default style will be used. | |
| setStylePattern | back to summary |
|---|---|
| public void setStylePattern(String stylePattern) Set the two characters to use to format date values. The first character is used for the date style; the second is used for the time style. Supported characters:
| |
| setTimeZone | back to summary |
|---|---|
| public void setTimeZone(TimeZone timeZone) Set the | |
| unsupportedStylePatternException | back to summary |
|---|---|
| private IllegalStateException unsupportedStylePatternException() | |