Class ISO8601Utils
- java.lang.Object
-
- com.fasterxml.jackson.databind.util.ISO8601Utils
-
@Deprecated public class ISO8601Utils extends java.lang.Object
Deprecated.Utilities methods for manipulating dates in iso8601 format. This is much much faster and GC friendly than using SimpleDateFormat so highly suitable if you (un)serialize lots of date objects. Supported parse format: [yyyy-MM-dd|yyyyMMdd][T(hh:mm[:ss[.sss]]|hhmm[ss[.sss]])]?[Z|[+-]hh[:]mm]]- See Also:
- this specification
-
-
Constructor Summary
Constructors Constructor Description ISO8601Utils()
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description 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]static java.util.Date
parse(java.lang.String date, java.text.ParsePosition pos)
Deprecated.Parse a date from ISO-8601 formatted string.
-
-
-
Method Detail
-
format
public static java.lang.String format(java.util.Date date)
Deprecated.Format a date into 'yyyy-MM-ddThh:mm:ssZ' (default timezone, no milliseconds precision)- Parameters:
date
- the date to format- Returns:
- the date formatted as 'yyyy-MM-ddThh:mm:ssZ'
-
format
public 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)- Parameters:
date
- the date to formatmillis
- true to include millis precision otherwise false- Returns:
- the date formatted as 'yyyy-MM-ddThh:mm:ss[.sss]Z'
-
format
@Deprecated public static java.lang.String format(java.util.Date date, boolean millis, java.util.TimeZone tz)
Deprecated.
-
format
public 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]- Parameters:
date
- the date to formatmillis
- true to include millis precision otherwise falsetz
- timezone to use for the formatting (UTC will produce 'Z')- Returns:
- the date formatted as yyyy-MM-ddThh:mm:ss[.sss][Z|[+-]hh:mm]
- Since:
- 2.9
-
parse
public static java.util.Date parse(java.lang.String date, java.text.ParsePosition pos) throws java.text.ParseException
Deprecated.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]]- Parameters:
date
- ISO string to parse in the appropriate format.pos
- The position to start parsing from, updated to where parsing stopped.- Returns:
- the parsed date
- Throws:
java.text.ParseException
- if the date is not in the appropriate format
-
-