abrin / foresite-toolkit

Automatically exported from code.google.com/p/foresite-toolkit
0 stars 0 forks source link

Improve parsing of ISO 8601 dateTime #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
DateParser doesn't handle all allowable ISO 8601 dateTime formats.

E.g. a parse exception is thrown when attempting to parse a valid ISO8601
dateTime such as '2009-11-23T13:29:24.604-05:00'.

See attached patch (against trunk).  It preserves the behavior of
DateParser (attempting to use the existing SimpleDateFormats), but then
goes on to use the ISODateTimeFormat from Joda Time.  (Patch adds a Joda
Time dependency and includes test).

Original issue reported on code.google.com by emets...@gmail.com on 3 Dec 2009 at 9:42

Attachments:

GoogleCodeExporter commented 9 years ago
Oh, this patch also adds source jar and javadoc jar generation in the pom... 
sorry
about polluting the patch.  But maybe you could keep that as it's helpful.

Original comment by emets...@gmail.com on 3 Dec 2009 at 9:49

GoogleCodeExporter commented 9 years ago

Original comment by azarot...@gmail.com on 15 Dec 2009 at 3:49