@Deprecated
public class ISO8601Utils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static int |
DEF_8601_LEN
Deprecated.
|
private static java.util.TimeZone |
TIMEZONE_Z
Deprecated.
Timezone we use for 'Z' in ISO-8601 date/time values: since 2.7
#TIMEZONE_UTC ; with earlier versions up to 2.7 was #TIMEZONE_GMT . |
Constructor and Description |
---|
ISO8601Utils()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
private static boolean |
checkOffset(java.lang.String value,
int offset,
char expected)
Deprecated.
Check if the expected character exist at the given offset in the value.
|
static java.lang.String |
format(java.util.Date date)
Deprecated.
Format a date into 'yyyy-MM-ddThh:mm:ssZ' (default timezone, no milliseconds precision)
|
static java.lang.String |
format(java.util.Date date,
boolean millis)
Deprecated.
Format a date into 'yyyy-MM-ddThh:mm:ss[.sss]Z' (GMT timezone)
|
static java.lang.String |
format(java.util.Date date,
boolean millis,
java.util.TimeZone tz)
Deprecated.
|
static java.lang.String |
format(java.util.Date date,
boolean millis,
java.util.TimeZone tz,
java.util.Locale loc)
Deprecated.
Format date into yyyy-MM-ddThh:mm:ss[.sss][Z|[+-]hh:mm]
|
private static int |
indexOfNonDigit(java.lang.String string,
int offset)
Deprecated.
Returns the index of the first character in the string that is not a digit, starting at offset.
|
static java.util.Date |
parse(java.lang.String date,
java.text.ParsePosition pos)
Deprecated.
Parse a date from ISO-8601 formatted string.
|
private static int |
parseInt(java.lang.String value,
int beginIndex,
int endIndex)
Deprecated.
Parse an integer located between 2 given offsets in a string
|
protected static final int DEF_8601_LEN
private static final java.util.TimeZone TIMEZONE_Z
#TIMEZONE_UTC
; with earlier versions up to 2.7 was #TIMEZONE_GMT
.public static java.lang.String format(java.util.Date date)
date
- the date to formatpublic static java.lang.String format(java.util.Date date, boolean millis)
date
- the date to formatmillis
- true to include millis precision otherwise false@Deprecated public static java.lang.String format(java.util.Date date, boolean millis, java.util.TimeZone tz)
public static java.lang.String format(java.util.Date date, boolean millis, java.util.TimeZone tz, java.util.Locale loc)
date
- the date to formatmillis
- true to include millis precision otherwise falsetz
- timezone to use for the formatting (UTC will produce 'Z')public static java.util.Date parse(java.lang.String date, java.text.ParsePosition pos) throws java.text.ParseException
date
- ISO string to parse in the appropriate format.pos
- The position to start parsing from, updated to where parsing stopped.java.text.ParseException
- if the date is not in the appropriate formatprivate static boolean checkOffset(java.lang.String value, int offset, char expected)
value
- the string to check at the specified offsetoffset
- the offset to look for the expected characterexpected
- the expected characterprivate static int parseInt(java.lang.String value, int beginIndex, int endIndex) throws java.lang.NumberFormatException
value
- the string to parsebeginIndex
- the start index for the integer in the stringendIndex
- the end index for the integer in the stringjava.lang.NumberFormatException
- if the value is not a numberprivate static int indexOfNonDigit(java.lang.String string, int offset)