Android Question ISO8601 painful parsing

peacemaker

Expert
Licensed User
Longtime User
HI, All

Is there any standard class or function that for sure can parse this garbage ?
Million variants of formatting, from various programming languages, libs....
Does Java have some standard function to get the ticks from any ISO8601 string ?

Please, no need any parsing code - i have seen tons already.

p.s. trouble is with string like "2019-04-17T22:45:05.6271501+03:00" - that is ... 7 digits after dot... that is from some JavaScript lib...
And seems, if the latest zero exists - it's avoided. So - is it 8 digits can be ?!?
All this means that the string format is not fixed, and always special parsing is required ?!
 
Last edited:

peacemaker

Expert
Licensed User
Longtime User
Thanks, Erel, for the elegant solution !
But as the subject - no any standard function in Java itself ?
 
Upvote 0
Top