@Test public void shouldHandleOffsetWithoutColon() { String isoCET = "2012-04-27T16:00:00+0200"; Date cetDate = CalendarDateFormatter.isoStringToDate(isoCET); String isoMST = "2012-04-27T08:00:00-0600"; Date mstDate = CalendarDateFormatter.isoStringToDate(isoMST); String isoUTC = "2012-04-27T14:00Z"; Date utcDate = CalendarDateFormatter.isoStringToDate(isoUTC); assertEquals(mstDate.getTime(), cetDate.getTime()); assertEquals(mstDate.getTime(), utcDate.getTime()); }
static public Date isoStringToDate(String iso) throws IllegalArgumentException { CalendarDate dt = isoStringToCalendarDate(null, iso); return dt.toDate(); }
CalendarDateFormatter { static public Date isoStringToDate(String iso) throws IllegalArgumentException { CalendarDate dt = isoStringToCalendarDate(null, iso); return dt.toDate(); } }
CalendarDateFormatter { static public Date isoStringToDate(String iso) throws IllegalArgumentException { CalendarDate dt = isoStringToCalendarDate(null, iso); return dt.toDate(); } CalendarDateFormatter(String pattern);  CalendarDateFormatter(String pattern, CalendarTimeZone tz, Calendar cal);  CalendarDateFormatter(String pattern, CalendarTimeZone tz); }
CalendarDateFormatter { static public Date isoStringToDate(String iso) throws IllegalArgumentException { CalendarDate dt = isoStringToCalendarDate(null, iso); return dt.toDate(); } CalendarDateFormatter(String pattern);  CalendarDateFormatter(String pattern, CalendarTimeZone tz, Calendar cal);  CalendarDateFormatter(String pattern, CalendarTimeZone tz); static String toDateTimeStringISO(CalendarDate cd); static String toDateTimeStringISO(Date d); static String toDateTimeString(CalendarDate cd); static String toDateTimeStringPresent(); static String toDateString(CalendarDate cd); static String toDateStringPresent(); static String toDateTimeString(Date date); @Deprecated static Date parseISODate(String iso); static CalendarDate isoStringToCalendarDate(Calendar calt, String iso); static Date isoStringToDate(String iso); String toString(CalendarDate cd); CalendarDate parse(String timeString); static void main(String arg[]); }
CalendarDateFormatter { static public Date isoStringToDate(String iso) throws IllegalArgumentException { CalendarDate dt = isoStringToCalendarDate(null, iso); return dt.toDate(); } CalendarDateFormatter(String pattern);  CalendarDateFormatter(String pattern, CalendarTimeZone tz, Calendar cal);  CalendarDateFormatter(String pattern, CalendarTimeZone tz); static String toDateTimeStringISO(CalendarDate cd); static String toDateTimeStringISO(Date d); static String toDateTimeString(CalendarDate cd); static String toDateTimeStringPresent(); static String toDateString(CalendarDate cd); static String toDateStringPresent(); static String toDateTimeString(Date date); @Deprecated static Date parseISODate(String iso); static CalendarDate isoStringToCalendarDate(Calendar calt, String iso); static Date isoStringToDate(String iso); String toString(CalendarDate cd); CalendarDate parse(String timeString); static void main(String arg[]); static final String isodatePatternString; }