|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object play.data.format.Formatters.SimpleFormatter<java.util.Date> play.data.format.Formats.DateFormatter
public static class Formats.DateFormatter
Formatter for java.util.Date
values.
Constructor Summary | |
---|---|
Formats.DateFormatter(java.lang.String pattern)
Creates a date formatter. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Formats.DateFormatter(java.lang.String pattern)
pattern
- date pattern, as specified for SimpleDateFormat
.Method Detail |
---|
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |