Open non-Jedi opened 4 years ago
There's really two issues here:
Dates
is millisecond. Through decimals fractions, ISO 8601 allows arbitrary precision times.DateFormat
machinery has no way of expressing this.1 seems intractable to me and should probably be punted to a third-party library, but 2 seems useful and possible. I am hesitant to introduce additional syntax to DateFormat
though. Would it be better to change the constructors in Dates
to accept additional DateFormat
options treating the order they are passed as the order of priority for parsing? Then the default without passing a DateFormat
could be that two versions of ISOTimeFormat
are used with parsing with comma-separator used as a fallback.
According to Wikipedia, for an ISO 8601 time:
So first, the
DateFormat
machinery should be upgraded to be compatible with decimal fractions and then we also need to make sureISODateTimeFormat
andISOTimeFormat
correctly handles said fractions.Currently: