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

How to parse date string of unknown locale #1270

Open
takinola opened this issue Dec 12, 2020 · 3 comments
Open

How to parse date string of unknown locale #1270

takinola opened this issue Dec 12, 2020 · 3 comments

Comments

@takinola
Copy link

I have a set of dates in the format "MMMM Do, YYYY". However I do not always know what locale the dates are in eg the string may be "January 1st, 2020" or "Janvier 1st, 2020" . How can I parse these date strings without foreknowledge of the locale?

@iamkun
Copy link
Owner

iamkun commented Dec 12, 2020

Maybe you need a loop to check the potential locales by your self

@takinola
Copy link
Author

How do I determine the locale just from the date string?

@iamkun
Copy link
Owner

iamkun commented Dec 13, 2020

Seems Day.js couldn't help.

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

2 participants