public class PrimaryDateParser extends Object
Modifier and Type | Field and Description |
---|---|
private Calendar |
calendar |
private DatatypeFactory |
datatypeFactory |
private FallbackDateParser |
fallbackDateParser |
Constructor and Description |
---|
PrimaryDateParser()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
private boolean |
isDateInLongStandardFormat(String date) |
private boolean |
isDateInShortStandardFormat(String date) |
Date |
parse(String date)
Attempts to parse the specified date.
|
private Date |
parseLongStandardDate(String date) |
private Date |
parseShortStandardDate(String date) |
private DatatypeFactory datatypeFactory
private FallbackDateParser fallbackDateParser
public PrimaryDateParser()
private boolean isDateInShortStandardFormat(String date)
private boolean isDateInLongStandardFormat(String date)
private Date parseShortStandardDate(String date)
private Date parseLongStandardDate(String date)
public Date parse(String date) throws ParseException
date
- The date to parse.ParseException
- Occurs if the date does not match any of the supported date
formats.