public class DateStringConverter extends DateTimeStringConverter
StringConverter implementation for Date values.
TimeStringConverter,
DateTimeStringConverter dateFormat, dateStyle, locale, pattern, timeStyle | Constructor and Description |
|---|
DateStringConverter ()
|
DateStringConverter (DateFormat dateFormat)
|
DateStringConverter (int dateStyle)
|
DateStringConverter (Locale locale)
Create a
StringConverter for Date values, using the
specified locale and the DateFormat.DEFAULT date style. |
DateStringConverter (Locale locale,
int dateStyle)
|
DateStringConverter (Locale locale,
String pattern)
Create a
StringConverter for Date values, using the
specified locale and pattern. |
DateStringConverter (String pattern)
Create a
StringConverter for Date values, using the
specified pattern. |
| Modifier and Type | Method and Description |
|---|---|
protected DateFormat |
getDateFormat ()
Return a
DateFormat instance to use for formatting
and parsing in this StringConverter. |
fromString, toString public DateStringConverter()
public DateStringConverter(int dateStyle)
dateStyle - the given formatting style. For example,
DateFormat.SHORT for "M/d/yy" in the US locale.public DateStringConverter(Locale locale)
StringConverter for Date values, using the
specified locale and the DateFormat.DEFAULT date style.locale - the given locale.public DateStringConverter(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(String pattern)
StringConverter for Date values, using the
specified pattern.pattern - the pattern describing the date format.public DateStringConverter(Locale locale, 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(DateFormat dateFormat)
dateFormat - the DateFormat to be used for formatting and
parsing.protected DateFormat getDateFormat()
Return a DateFormat instance to use for formatting
and parsing in this StringConverter.
getDateFormat in class DateTimeStringConverter Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.