public static class Formats.DateFormatter extends Formatters.SimpleFormatter<java.util.Date>
java.util.Date
values.Constructor and Description |
---|
DateFormatter(java.lang.String pattern)
Creates a date formatter.
|
Modifier and Type | Method and Description |
---|---|
java.util.Date |
parse(java.lang.String text,
java.util.Locale locale)
Binds the field - constructs a concrete value from submitted data.
|
java.lang.String |
print(java.util.Date value,
java.util.Locale locale)
Unbinds this fields - converts a concrete value to a plain string.
|
public DateFormatter(java.lang.String pattern)
pattern
- date pattern, as specified for SimpleDateFormat
.public java.util.Date parse(java.lang.String text, java.util.Locale locale) throws java.text.ParseException
parse
in class Formatters.SimpleFormatter<java.util.Date>
text
- the field textlocale
- the current Locale
java.text.ParseException
public java.lang.String print(java.util.Date value, java.util.Locale locale)
print
in class Formatters.SimpleFormatter<java.util.Date>
value
- the value to unbindlocale
- the current Locale