any-date-parser
any-date-parser copied to clipboard
Valid date being marked invalid
The following date results in invalid
status:
2022-05-25T16:03:12.2085
when using this:
dateParser.fromAny("2022-05-25T16:03:12.2085");
will return this:
{invalid: 'Unable to parse 2022-05-25T16:03:12.2085'}invalid: "Unable to parse 2022-05-25T16:03:12.2085"[[Prototype]]: Object
but a normal date constructor works fine:
Same thing happens today on Windows, Chrome and iPhone's Safari. Macbook's Chrome parsing ok.
upd: Found problem, something with the locales, like half of them are not being parsed properly. For example, English & CM works ok, ZA, RU, ET, ER, don't. That's only few that I've randomly selected from the full list. Fixed by adding 'en' locale as second argument in the parse functions.
@kolmakova Given that you didn't have some locales installed, can you clarify what is the current behavior and desired behavior?