|
|||||||||||
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.TimeStringConvertor
String convertor for type Time
or java.util.Date
. Date part of Date
instances are ignored.
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.getTimeInstance(DateFormat.MEDIUM)and default parsers are:
DateFormat.getTimeInstance(DateFormat.FULL); DateFormat.getTimeInstance(DateFormat.LONG); DateFormat.getTimeInstance(DateFormat.MEDIUM); DateFormat.getTimeInstance(DateFormat.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
,
DateTimeStringConvertor
Constructor Summary | |
TimeStringConvertor()
Creates new TimeStringConvertor. |
|
TimeStringConvertor(java.text.DateFormat inFormatter,
java.text.DateFormat[] inParsers)
Creates new TimeStringConvertor 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 TimeStringConvertor()
public TimeStringConvertor(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 |