| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final int | |
| private static final Pattern | |
| private static final String | |
| private static final int | |
| private static final Pattern |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Date | Returns: calculated date, or null if is not a NOW or TODAY prefixed value.value to convert to a date value, String Column type (e.g. "timestamp", "time", "date", or "datetime") colType)Determines value for "NOW" or "TODAY" prefixed value. |
| public static boolean | Returns: true if value starts with "NOW" or "TODAY" (case insensitive), false otherwise.value to test value)Checks if date starts with "NOW" or "TODAY". |
| private static void | |
| private static void | parseToday(String
original value value, String lower cased value. lowerValue, Calendar Calendar with appropriate offset applied. c)Parses "TODAY" type specification, and applies offset (if any) to calendar value. |
| NOW | back to summary |
|---|---|
| private static final String NOW | |
| NOW_LENGTH | back to summary |
|---|---|
| private static final int NOW_LENGTH | |
| NOW_OFFSET_PATTERN | back to summary |
|---|---|
| private static final Pattern NOW_OFFSET_PATTERN | |
| TODAY | back to summary |
|---|---|
| private static final String TODAY | |
| TODAY_LENGTH | back to summary |
|---|---|
| private static final int TODAY_LENGTH | |
| TODAY_OFFSET_PATTERN | back to summary |
|---|---|
| private static final Pattern TODAY_OFFSET_PATTERN | |
| NowAndTodayUtil | back to summary |
|---|---|
| private NowAndTodayUtil() Private constructor to prevent instantiation. | |
| doNowOrToday | back to summary |
|---|---|
| public static Date doNowOrToday(String value, String colType) throws DateParseException Determines value for "NOW" or "TODAY" prefixed value. "NOW" format can simply be "NOW" (case insensitive), or "NOW" followed by a "+" or "=", then an integer, then a unit. "M" or "MINUTE" or "MINUTES", "H" or "HOUR" or "HOURS", "D" or "DAY" or "DAYS", "Y", "YEAR", or 'YEARS". "TODAY" format can be simply "TODAY" (case insensitive), or "TODAY" followed by a "+" or "-", then an integer, to calculate an offset from today.
| |
| isNowOrTodayFormat | back to summary |
|---|---|
| public static boolean isNowOrTodayFormat(String value) Checks if date starts with "NOW" or "TODAY".
| |
| parseNow | back to summary |
|---|---|
| private static void parseNow(String value, String lowerValue, Calendar c) throws DateParseException Parses "NOW" type specification, and applies offset (if any) to calendar value.
| |
| parseToday | back to summary |
|---|---|
| private static void parseToday(String value, String lowerValue, Calendar c) throws DateParseException Parses "TODAY" type specification, and applies offset (if any) to calendar value.
| |