public abstract class DateConversionSupport extends Object
NOTE: parse(format(date)) will generally *not* be equal to date, since the string representation may not cover the sub-second range, time-only string representations will be counted from the beginning of the era, etc.
| Constructor and Description |
|---|
DateConversionSupport() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
format(Date date)
Formats the given date with the default formatter according to the default locale.
|
protected String |
format(Date date,
int formatterIdx) |
protected com.ibm.icu.text.DateFormat |
getDateFormat(int index)
Returns the date format for the provided
index. |
protected int |
numFormatters() |
protected Date |
parse(String str)
Tries all available formatters to parse the given string according to the
default locale or as a raw millisecond value and returns the result of the
first successful run.
|
protected Date |
parse(String str,
int formatterIdx) |
public DateConversionSupport()
protected Date parse(String str)
str - A string specifying a date according to the default locale or in raw millisecondsprotected String format(Date date)
date - a dateprotected int numFormatters()
protected com.ibm.icu.text.DateFormat getDateFormat(int index)
index.
This is for testing purposes only and should not be a part of the API if this class was to be exposed.
index -