Class MCRDateConverter
java.lang.Object
org.mycore.frontend.xeditor.validation.MCRDateConverter
Helper for date validators to convert string input into a date value.
- Author:
- Frank Lützenkirchen
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected SimpleDateFormat
getDateFormat
(String pattern) string2date
(String input)
-
Constructor Details
-
MCRDateConverter
- Parameters:
patterns
- a list of allowed SimpleDateFormat patterns separated by ";"
-
-
Method Details
-
getDateFormat
-
string2date
- Parameters:
input
- the text string- Returns:
- the parsed Date matching one of the allowed date patterns, or null if the text can not be parsed
- Throws:
MCRException
-