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

missing support for a plausable format #21

Open
petar-dambovaliev opened this issue Jan 22, 2022 · 4 comments
Open

missing support for a plausable format #21

petar-dambovaliev opened this issue Jan 22, 2022 · 4 comments

Comments

@petar-dambovaliev
Copy link

petar-dambovaliev commented Jan 22, 2022

 Message("07-07-2021 did not match any formats.") } }) // dd-mm-yyyy
@waltzofpearls
Copy link
Owner

@petar-dambovaliev Thanks for reporting the bug. I will work on a fix.

@SergeyKasmy
Copy link

Yeah, I was really excited when I found this library but sadly it's completely useless for me since most of my dates follow dd.mm.yyyy or dd/mm/yyyy formats

@waltzofpearls
Copy link
Owner

@SergeyKasmy Thanks for reporting this issue. I've been a little busy recently. That said, I will spend some time this weekend and look into this.

The tricky thing for supporting both day first format like dd/mm/yyyy and month first format like mm/dd/yyyy is that it could make input data ambiguous, because the parser needs to determine whether it should use day-month-year or month-day-year, for example, given an input data 01/02/2022, is it February 1st or January 2nd?

One thing I could do is adding another option that can be passed into the parser. This new option can make the parser prefer day-month-year format, and the default preferred format is month-day-year.

@fzgregor
Copy link

@waltzofpearls I just ran into the same issue as @SergeyKasmy, which makes your crate unusable for me as well.

I understand that there is an issue with / as separator, but FWIK with . separator there is no country that uses mm.dd.yyyy. Only dd.mm.yyyy is commonly accepted. I briefly checked https://en.wikipedia.org/wiki/Date_format_by_country and found nothing to the contrary.

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

4 participants