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 dates of format DD/MM/YYYY? #64

Open
PhilAndrew opened this issue Dec 21, 2013 · 5 comments
Open

How to parse dates of format DD/MM/YYYY? #64

PhilAndrew opened this issue Dec 21, 2013 · 5 comments

Comments

@PhilAndrew
Copy link

In Hong Kong and Australia we do dates as 20/10/1984 meaning 20th October 1984.

How can I parse that date?

@amferraz
Copy link

I'm in this very same situation. Currently, my two guesses are:

  1. Fork the project and change it accordingly.
  2. Support ambiguity natively and let the user choose based on Locale information.

The second one seems to be the right way to do it, but also much more complex.

@PhilAndrew
Copy link
Author

What I did is I did a regex to match the date string 20/10/1974, so once I matched this string I then adjusted the order of the digits so that it becomes 1974/10/20, basically the reverse.

Then I passed it to natty and natty was happy. So basically I was pre-processing the string before passing it to natty in the form that natty understands.

Hey, there's a world out there that uses strings in DD/MM/YYYY format !

@PhilAndrew
Copy link
Author

This is my codes which solves this issue, of course not intended to fix the issue, just to solve the problem as a workaround.

http://pastebin.com/ZhW9wTbz

@eytanbiala
Copy link

+1

@eytanbiala
Copy link

Is there any update on this issue?

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