ISO8601 { public static Date parse(final String iso8601string) { try { return toCalendar(iso8601string).getTime(); } catch (ParseException e) { return null; } }  static String fromCalendar(final Calendar calendar); static Calendar toCalendar(final String iso8601string); static Date parse(final String iso8601string);  }
@Test public void testParse() throws Exception { assertNull(ISO8601.parse("")); assertFalse(ISO8601.parse("2014-07-07T10:03:04+00:00").equals(new Date(1404727384001L))); assertTrue(ISO8601.parse("2014-12-09T20:45:57+04:00").equals(new Date(1418143557000L))); }