public class DateStringConverter extends DateTimeStringConverter
StringConverter
implementation for Date
values.
TimeStringConverter
,
DateTimeStringConverter
dateFormat, dateStyle, locale, pattern, timeStyle
Modifier | Constructor and Description |
---|---|
|
DateStringConverter()
Create a
StringConverter for Date values, using the
DateFormat.DEFAULT date style. |
|
DateStringConverter(java.text.DateFormat dateFormat)
Create a
StringConverter for Date values, using the
specified DateFormat formatter. |
|
DateStringConverter(int dateStyle)
Create a
StringConverter for Date values, using the
specified DateFormat date style. |
|
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)
Create a
StringConverter for Date values, using the
specified locale and DateFormat date style. |
|
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, toString
public DateStringConverter()
StringConverter
for Date
values, using the
DateFormat.DEFAULT
date style.public DateStringConverter(int dateStyle)
StringConverter
for Date
values, using the
specified DateFormat
date style.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)
StringConverter
for Date
values, using the
specified locale and DateFormat
date style.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)
StringConverter
for Date
values, using the
specified DateFormat
formatter.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
DateFormat
instance for formatting and parsing in this
StringConverter