| Modifier and Type | Field and Description |
|---|---|
| private static final Map | MONTH_NAMES_CACHE
A cache for month names |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static Map | Returns: the map of month names (short and long) and the corresponding month numbers. All names are converted to upper case.the locale locale)Retrieves and caches a map of month names and numbers for a given locale |
| private static CSLDate | |
| public static CSLDate | |
| public static CSLDate | Returns: theCSLDate object or null if both, the year and the
month, could not be parsedthe year to parse. Should be a four-digit number or a String
whose last four characters are digits. year, String the month to parse. May be a number ( month)1-12),
a short month name (Jan to Dec), or a
long month name (January to December). This
method is also able to recognize month names in several locales.Parses the given year and month to a |
| public static CSLDate | Returns: theCSLDate object or null if both, the year and the
month, could not be parsedthe year to parse. Should be a four-digit number or a String
whose last four characters are digits. year, String the month to parse. May be a number ( month)1-12),
a short month name (Jan to Dec), or a
long month name (January to December). This
method is also able to recognize month names in several locales.Parses the given year and month to a |
| public static CSLDate | Returns: theCSLDate object or null if both, the year and the
month, could not be parsedthe year to parse. Should be a four-digit number or a String
whose last four characters are digits. year, String the month to parse. May be a number ( month)1-12),
a short month name (Jan to Dec), or a
long month name (January to December). This
method is also able to recognize month names in several locales.Parses the given year and month to a |
| public static int | Returns: the month's number (1-12) or -1 if
the string could not be parsedthe month to parse. May be a number ( month)1-12),
a short month name (Jan to Dec), or a
long month name (January to December). This
method is also able to recognize month names in several locales.Parses the given month string |
| private static int | Returns: the month's number (1-12) or -1 if
the string could not be parsedthe month string month, Locale the locale locale)Tries to parse the given month string using the month names of the given locale |
| MONTH_NAMES_CACHE | back to summary |
|---|---|
| private static final Map<Locale, Map<String, Integer>> MONTH_NAMES_CACHE A cache for month names
| |
| DateParser | back to summary |
|---|---|
| public DateParser() | |
| getMonthNames | back to summary |
|---|---|
| private static Map Retrieves and caches a map of month names and numbers for a given locale | |
| merge | back to summary |
|---|---|
| private static CSLDate merge(CSLDate d1, CSLDate d2) Merges two dates | |
| toDate | back to summary |
|---|---|
| public static CSLDate toDate(String dateString) Converts a given date string to a | |
| toDate | back to summary |
|---|---|
| public static CSLDate toDate(String year, String month) Parses the given year and month to a
| |
| toDateRange | back to summary |
|---|---|
| public static CSLDate toDateRange(String year, String month) Parses the given year and month to a
| |
| toDateSingle | back to summary |
|---|---|
| public static CSLDate toDateSingle(String year, String month) Parses the given year and month to a
| |
| toMonth | back to summary |
|---|---|
| public static int toMonth(String month) Parses the given month string
| |
| tryParseMonth | back to summary |
|---|---|
| private static int tryParseMonth(String month, Locale locale) Tries to parse the given month string using the month names of the given locale | |