public class DateStringConverter extends DateTimeStringConverter
StringConverter implementation for Date values.
TimeStringConverter,
DateTimeStringConverterdateFormat, dateStyle, locale, pattern, timeStyle| Modifier | Constructor and Description |
|---|---|
|
DateStringConverter()
|
|
DateStringConverter(java.text.DateFormat dateFormat)
|
|
DateStringConverter(int dateStyle)
|
|
DateStringConverter(java.util.Locale locale)
Create a
StringConverter for Date values, using the
specified locale and the DateFormat.DEFAULT date style. |
|
DateStringConverter(java.util.Locale locale,
int dateStyle)
|
|
DateStringConverter(java.util.Locale locale,
java.lang.String pattern)
Create a
StringConverter for Date values, using the
specified locale and pattern. |
private |
DateStringConverter(java.util.Locale locale,
java.lang.String pattern,
java.text.DateFormat dateFormat,
int dateStyle) |
|
DateStringConverter(java.lang.String pattern)
Create a
StringConverter for Date values, using the
specified pattern. |
| Modifier and Type | Method and Description |
|---|---|
protected java.text.DateFormat |
getDateFormat()
Return a
DateFormat instance to use for formatting
and parsing in this StringConverter. |
fromString, toStringpublic DateStringConverter()
public DateStringConverter(int dateStyle)
dateStyle - the given formatting style. For example,
DateFormat.SHORT for "M/d/yy" in the US locale.public DateStringConverter(java.util.Locale locale)
StringConverter for Date values, using the
specified locale and the DateFormat.DEFAULT date style.locale - the given locale.public DateStringConverter(java.util.Locale locale,
int dateStyle)
locale - the given locale.dateStyle - the given formatting style. For example,
DateFormat.SHORT for "M/d/yy" in the US locale.public DateStringConverter(java.lang.String pattern)
StringConverter for Date values, using the
specified pattern.pattern - the pattern describing the date format.public DateStringConverter(java.util.Locale locale,
java.lang.String pattern)
StringConverter for Date values, using the
specified locale and pattern.locale - the given locale.pattern - the pattern describing the date format.public DateStringConverter(java.text.DateFormat dateFormat)
dateFormat - the DateFormat to be used for formatting and
parsing.private DateStringConverter(java.util.Locale locale,
java.lang.String pattern,
java.text.DateFormat dateFormat,
int dateStyle)
protected java.text.DateFormat getDateFormat()
Return a DateFormat instance to use for formatting
and parsing in this StringConverter.
getDateFormat in class DateTimeStringConverter