Supported parse format: [yyyy-MM-dd|yyyyMMdd][T(hh:mm[:ss[.sss]]|hhmm[ss[.sss]])]?[Z|[+-]hh[:]mm]]
| Modifier and Type | Field and Description |
|---|---|
| private static final TimeZone | TIMEZONE_UTC
The UTC timezone, prefetched to avoid more lookups. |
| private static final String | UTC_ID
ID to represent the 'UTC' string, default timezone since Jackson 2.7 |
| Access | Constructor and Description |
|---|---|
| private |
| 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 | |
| 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. |
| private static void | padInt(StringBuilder
buffer to use for padding buffer, int the integer value to pad if necessary. value, int the length of the string we should zero pad length)Zero pad a number to a specified length |
| 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 |
| TIMEZONE_UTC | back to summary |
|---|---|
| private static final TimeZone TIMEZONE_UTC The UTC timezone, prefetched to avoid more lookups.
| |
| UTC_ID | back to summary |
|---|---|
| private static final String UTC_ID ID to represent the 'UTC' string, default timezone since Jackson 2.7
| |
| ISO8601Utils | back to summary |
|---|---|
| private 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) 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. | |
| padInt | back to summary |
|---|---|
| private static void padInt(StringBuilder buffer, int value, int length) Zero pad a number to a specified length
| |
| 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
| |