public class MultiFormatDateParser extends Object
setPatterns(java.util.Map<java.lang.String, java.lang.String>). parse(java.lang.String) walks
the provided list in the order provided and tries each entry against a String.
Dates are parsed as being in the UTC zone.| Constructor and Description |
|---|
MultiFormatDateParser() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] args) |
static Date |
parse(String dateString)
Compare a string to each injected regular expression in entry order, and
when it matches, attempt to parse it using the associated format.
|
void |
setPatterns(Map<String,String> patterns) |
public static Date parse(String dateString)
dateString - the supposed date to be parsed.null if none.public static void main(String[] args) throws IOException
IOExceptionCopyright © 2022 LYRASIS. All rights reserved.