converting dateOptionalTime to java.time

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

converting dateOptionalTime to java.time

This post has NOT been accepted by the mailing list yet.

This might not be the appropriate list however I'm hoping library experts can chime in.

I'm trying to migrate from Joda to Java 8 java.time package but that doesn't seem possible.
I'm using Joda's ISODateTimeFormat.dateOptionalTimeParser but I can't seem to find anything
similar in java.time.
The culprit seems to be that Joda allows multiple DateFormats to be chained while this features
is not available in java.time.
As a concrete example, to quote Joda's dateOptionalTimeParser javadocs can parse the date in three
different formats: std-date-element | ord-date-element | week-date-element however java.time
allows only one.

While with Joda DateTimeFormatterBuilder, one can append multiple parsers, java.time allows only one.

Am I missing something?