public class ISO8601 extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ISO8601.ISODateFormat |
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPLETE_DATE_FORMAT
Complete date: YYYY-MM-DD (eg 1997-07-16)
|
static String |
COMPLETE_DATEHOURSMINUTESZ_FORMAT
Complete date plus hours and minutes: YYYY-MM-DDThh:mmTZD (eg
1997-07-16T19:20+01:00)
|
static String |
COMPLETE_DATEHOURSMINUTESZRFC822_FORMAT
NON ISO STANDARD.
|
static String |
COMPLETE_DATETIMEMSZ_FORMAT
Complete date plus hours, minutes, seconds and a decimal fraction of a
second YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.450+01:00)
|
static String |
COMPLETE_DATETIMEMSZ_FORMAT_1
Complete date plus hours, minutes, seconds and a decimal fraction of a
second YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00)
|
static String |
COMPLETE_DATETIMEMSZRFC822_FORMAT
Complete date plus hours, minutes, seconds and a decimal fraction of a
second, with time zone by RFC822 YYYY-MM-DDThh:mm:ss.sZ (eg
1997-07-16T19:20:30.450+0100)
|
static String |
COMPLETE_DATETIMEMSZRFC822_FORMAT_1
Complete date plus hours, minutes, seconds and a decimal fraction of a
second, with time zone by RFC822 YYYY-MM-DDThh:mm:ss.sZ (eg
1997-07-16T19:20:30.45+0100)
|
static String |
COMPLETE_DATETIMEZ_FORMAT
Complete date plus hours, minutes and seconds: YYYY-MM-DDThh:mm:ssTZD (eg
1997-07-16T19:20:30+01:00)
|
static String |
COMPLETE_DATETIMEZRFC822_FORMAT
NON ISO STANDARD.
|
static String[] |
FORMATS
Possible formats list.
|
static String[] |
LEGACY_FORMATS |
static String |
SIMPLE_DATEHOURSMINUTES_FORMAT
NON ISO STANDARD.
|
static String |
SIMPLE_DATETIME_FORMAT
NON ISO STANDARD.
|
static String |
SIMPLE_DATETIMEMS_FORMAT
NON ISO STANDARD.
|
static String |
SIMPLE_DATETIMEMS_FORMAT_1
NON ISO STANDARD.
|
protected static String |
TZD
ISO 8601 time zone designator
|
static String |
YEAR_FORMAT
Year: YYYY (eg 1997)
|
static String |
YEARMONTH_FORMAT
Year and month: YYYY-MM (eg 1997-07)
|
| Constructor and Description |
|---|
ISO8601() |
| Modifier and Type | Method and Description |
|---|---|
static String |
format(Calendar date)
Format date using format: complete date plus hours, minutes, seconds and a
decimal fraction of a second.
|
static Calendar |
parse(String dateString)
Parse string using possible formats list.
|
static Calendar |
parse(String dateString,
String[] formats)
Parse string using given formats list.
|
static Calendar |
parseEx(String dateString)
Parse string using possible formats list.
|
protected static final String TZD
public static final String YEAR_FORMAT
public static final String YEARMONTH_FORMAT
public static final String COMPLETE_DATE_FORMAT
public static final String SIMPLE_DATEHOURSMINUTES_FORMAT
public static final String COMPLETE_DATEHOURSMINUTESZRFC822_FORMAT
public static final String COMPLETE_DATEHOURSMINUTESZ_FORMAT
public static final String SIMPLE_DATETIME_FORMAT
public static final String COMPLETE_DATETIMEZRFC822_FORMAT
public static final String COMPLETE_DATETIMEZ_FORMAT
public static final String SIMPLE_DATETIMEMS_FORMAT_1
public static final String SIMPLE_DATETIMEMS_FORMAT
public static final String COMPLETE_DATETIMEMSZRFC822_FORMAT_1
public static final String COMPLETE_DATETIMEMSZRFC822_FORMAT
public static final String COMPLETE_DATETIMEMSZ_FORMAT
public static final String COMPLETE_DATETIMEMSZ_FORMAT_1
public static final String[] FORMATS
public static final String[] LEGACY_FORMATS
public static String format(Calendar date)
date - public static Calendar parse(String dateString)
dateString - - date stringpublic static Calendar parseEx(String dateString) throws ParseException, NumberFormatException
dateString - - date stringParseExceptionNumberFormatExceptionpublic static Calendar parse(String dateString, String[] formats) throws ParseException, NumberFormatException
dateString - formats - ParseExceptionNumberFormatExceptionCopyright © 2021 eXo Platform SAS. All Rights Reserved.