Deprecated
Use com. instead
Watch out for clone implementation that returns itself.
All other methods but parse and format and clone are undefined behavior.
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public StringBuffer | format(Date
a Date to be formatted into a date-time string. date, StringBuffer the string buffer for the returning date-time string. toAppendTo, FieldPosition keeps track on the position of the field within
the returned string. For example, given a date-time text
fieldPosition)"1996.07.10 AD at 15:08:56 PDT", if the given fieldPosition
is DateFormat#YEAR_FIELD, the begin index and end index of
fieldPosition will be set to 0 and 4, respectively.
Notice that if the same date-time field appears more than once in a
pattern, the fieldPosition will be set for the first occurrence
of that date-time field. For instance, formatting a Date to the
date-time string "1 PM PDT (Pacific Daylight Time)" using the
pattern "h a z (zzzz)" and the alignment field
DateFormat#TIMEZONE_FIELD, the begin index and end index of
fieldPosition will be set to 5 and 8, respectively, for the
first occurrence of the timezone pattern character 'z'.Implements abstract java. Date into a date-time string.
|
| public Date | parse(String
The date/time string to be parsed source, ParsePosition On input, the position at which to start parsing; on
output, the position at which parsing terminated, or the
start position if the parse failed. pos)Implements abstract java. |
| public Date | parse(String
A source)String whose beginning should be parsed.Overrides java. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| ISO8601DateFormat | back to summary |
|---|---|
| public ISO8601DateFormat() | |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Doc from java. Overrides Cloneable
| |
| format | back to summary |
|---|---|
| public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) Implements abstract java. Doc from java. Formats a
| |
| parse | back to summary |
|---|---|
| public Date parse(String source, ParsePosition pos) Implements abstract java. Doc from java. Parse a date/time string according to the given parse position. For
example, a time text By default, parsing is lenient: If the input is not in the form used
by this object's format method but can still be parsed as a date, then
the parse succeeds. Clients may insist on strict adherence to the
format by calling This parsing operation uses the
| |
| parse | back to summary |
|---|---|
| public Date parse(String source) throws ParseException Overrides java. Doc from java. Parses text from the beginning of the given string to produce a date. The method may not use the entire text of the given string.
See the
| |