|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.scopemvc.util.convertor.NullStringConvertor | +--org.scopemvc.util.convertor.DateStringConvertor | +--org.scopemvc.util.convertor.DateTimeStringConvertor
String convertor for type DateTime
or java.util.Date
. Both date and time parts of Date
instances are used.
It uses one java.text.DateFormat DateFormat
for converting into
String
and an array of DateFormat
s for parsing.
Parsing formats are successively used to try to parse until one is
successful.
Formats are picked up from config (see DefaultScopeConfig
for details) or if none in config, the
default formatter is:
DateFormat.getDateTimeInstance()and default parsers are:
DateFormat.getDateTimeInstance((FULL|LONG|MEDIUM|SHORT), (FULL|LONG|MEDIUM|SHORT));Note: the default parsing set is initialized during class loading and based on default platform locale. If application uses other locales, there will be need to set parsing objects explicitly.
DateStringConvertor
,
TimeStringConvertor
Constructor Summary | |
DateTimeStringConvertor()
Creates new TimeStringConvertor. |
|
DateTimeStringConvertor(java.text.DateFormat inFormatter,
java.text.DateFormat[] inParsers)
Creates new DateTimeStringConvertor with specified formatter and parsers. |
Method Summary | |
protected java.text.DateFormat[] |
getDefaultParsers()
Gets the default parsers |
Methods inherited from class org.scopemvc.util.convertor.DateStringConvertor |
initDefaults, setFormatter, setParsers, stringAsValue, valueAsString |
Methods inherited from class org.scopemvc.util.convertor.NullStringConvertor |
getNullAsString, isNull, setNullAsString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DateTimeStringConvertor()
public DateTimeStringConvertor(java.text.DateFormat inFormatter, java.text.DateFormat[] inParsers)
inFormatter
- TODO: Describe the ParameterinParsers
- TODO: Describe the ParameterMethod Detail |
protected java.text.DateFormat[] getDefaultParsers()
getDefaultParsers
in class DateStringConvertor
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |