Deprecated
| Modifier and Type | Field and Description |
|---|---|
| protected static final int | |
| private static final TimeZone | TIMEZONE_Z
Timezone we use for 'Z' in ISO-8601 date/time values: since 2.7
|
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static boolean | Returns: true if the expected character exist at the given offsetthe string to check at the specified offset value, int the offset to look for the expected character offset, char the expected character expected)Check if the expected character exist at the given offset in the value. |
| public static String | |
| public static String | |
| public static String | |
| public static String | Returns: the date formatted as yyyy-MM-ddThh:mm:ss[.sss][Z|[+-]hh:mm]the date to format date, boolean true to include millis precision otherwise false millis, TimeZone timezone to use for the formatting (UTC will produce 'Z') tz, Locale loc)Format date into yyyy-MM-ddThh:mm:ss[.sss][Z|[+-]hh:mm] |
| private static int | indexOfNonDigit(String string, int offset)
Returns the index of the first character in the string that is not a digit, starting at offset. |
| public static Date | Returns: the parsed dateISO string to parse in the appropriate format. date, ParsePosition The position to start parsing from, updated to where parsing stopped. pos)Parse a date from ISO-8601 formatted string. |
| private static int |
| DEF_8601_LEN | back to summary |
|---|---|
| protected static final int DEF_8601_LEN | |
| TIMEZONE_Z | back to summary |
|---|---|
| private static final TimeZone TIMEZONE_Z Timezone we use for 'Z' in ISO-8601 date/time values: since 2.7
| |
| ISO8601Utils | back to summary |
|---|---|
| public ISO8601Utils() | |
| checkOffset | back to summary |
|---|---|
| private static boolean checkOffset(String value, int offset, char expected) Check if the expected character exist at the given offset in the value.
| |
| format | back to summary |
|---|---|
| public static String format(Date date) Format a date into 'yyyy-MM-ddThh:mm:ssZ' (default timezone, no milliseconds precision) | |
| format | back to summary |
|---|---|
| public static String format(Date date, boolean millis) Format a date into 'yyyy-MM-ddThh:mm:ss[.sss]Z' (GMT timezone) | |
| format | back to summary |
|---|---|
| public static String format(Date date, boolean millis, TimeZone tz)
Deprecated
| |
| format | back to summary |
|---|---|
| public static String format(Date date, boolean millis, TimeZone tz, Locale loc) Format date into yyyy-MM-ddThh:mm:ss[.sss][Z|[+-]hh:mm] | |
| indexOfNonDigit | back to summary |
|---|---|
| private static int indexOfNonDigit(String string, int offset) Returns the index of the first character in the string that is not a digit, starting at offset. | |
| parse | back to summary |
|---|---|
| public static Date parse(String date, ParsePosition pos) throws ParseException Parse a date from ISO-8601 formatted string. It expects a format [yyyy-MM-dd|yyyyMMdd][T(hh:mm[:ss[.sss]]|hhmm[ss[.sss]])]?[Z|[+-]hh:mm]]
| |
| parseInt | back to summary |
|---|---|
| private static int parseInt(String value, int beginIndex, int endIndex) throws NumberFormatException Parse an integer located between 2 given offsets in a string
| |