public class MultiFormatDateParser
extends java.lang.Object
setPatterns. parse 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(java.lang.String[] args) |
static java.util.Date |
parse(java.lang.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(java.util.Map<java.lang.String,java.lang.String> patterns) |
@Inject public void setPatterns(java.util.Map<java.lang.String,java.lang.String> patterns)
public static java.util.Date parse(java.lang.String dateString)
dateString - the supposed date to be parsed.null if none.public static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOExceptionCopyright © 2018 DuraSpace. All Rights Reserved.