Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valid date being marked invalid #17

Open
amcdnl opened this issue May 25, 2022 · 2 comments
Open

Valid date being marked invalid #17

amcdnl opened this issue May 25, 2022 · 2 comments

Comments

@amcdnl
Copy link

amcdnl commented May 25, 2022

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:

image

@kolmakova
Copy link

kolmakova commented May 26, 2022

date

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.

@kensnyder
Copy link
Owner

@kolmakova Given that you didn't have some locales installed, can you clarify what is the current behavior and desired behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants