java.text.DateFormat . You can obtain an object implementing this
interface by using one of the FastDateFormat factory methods.Warning
Since binary compatible methods may be added to this interface in any release, developers are not expected to implement this interface.
| Modifier and Type | Method and Description |
|---|---|
| public Locale | |
| public String | Returns: the pattern,java. compatible.Gets the pattern used by this parser. |
| public TimeZone | |
| public Date | |
| public Date | Returns: ADate parsed from the string. In case of error, returns null.A source, ParsePosition String, part of which should be parsed.A pos)ParsePosition object with index and error index information
as described above.Equivalent to DateFormat.parse(String, ParsePosition). |
| public boolean | Returns: true, if source has been parsed (pos parsePosition is updated); otherwise false (and pos errorIndex is updated)The text to parse. source, ParsePosition On input, the position in the source to start parsing, on output, updated position. pos, Calendar The calendar into which to set parsed fields. calendar)Parses a formatted date string according to the format. |
| public Object | Returns: ajava. object.A source)String whose beginning should be parsed.Parses text from a string to produce a Date. |
| public Object | Returns: ajava. object.A source, ParsePosition String whose beginning should be parsed.the parse position. pos)Parses a date/time string according to the given parse position. |
| getLocale | back to summary |
|---|---|
| public Locale getLocale() Gets the locale used by this parser.
| |
| getPattern | back to summary |
|---|---|
| public String getPattern() Gets the pattern used by this parser.
| |
| getTimeZone | back to summary |
|---|---|
| public TimeZone getTimeZone() Gets the time zone used by this parser.
The default
| |
| parse | back to summary |
|---|---|
| public Date parse(String source) throws ParseException Equivalent to DateFormat.parse(String).
See
| |
| parse | back to summary |
|---|---|
| public Date parse(String source, ParsePosition pos) Equivalent to DateFormat.parse(String, ParsePosition).
See
| |
| parse | back to summary |
|---|---|
| public boolean parse(String source, ParsePosition pos, Calendar calendar) Parses a formatted date string according to the format. Updates the Calendar with parsed fields. Upon success, the ParsePosition index is updated to indicate how much of the source text was consumed. Not all source text needs to be consumed. Upon parse failure, ParsePosition error index is updated to the offset of the source text which does not match the supplied format.
| |
| parseObject | back to summary |
|---|---|
| public Object parseObject(String source) throws ParseException Parses text from a string to produce a Date.
| |
| parseObject | back to summary |
|---|---|
| public Object parseObject(String source, ParsePosition pos) Parses a date/time string according to the given parse position.
| |