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

Cannot parse "13-02-2015", but successfully parses "13/02/2015" #155

Open
prathameshpatel opened this issue Jul 30, 2023 · 0 comments · May be fixed by #159
Open

Cannot parse "13-02-2015", but successfully parses "13/02/2015" #155

prathameshpatel opened this issue Jul 30, 2023 · 0 comments · May be fixed by #159

Comments

@prathameshpatel
Copy link

layout, err := dateparse.ParseFormat("13-02-2015", dateparse.PreferMonthFirst(false))
This fails with error = Could not find format for "13-02-2015"

Whereas, layout, err := dateparse.ParseFormat("13/02/2015", dateparse.PreferMonthFirst(false)) parses successfully

Are there any plans to support hyphens - in place of forward-slash / ?

klondikedragon added a commit to itlightning/dateparse that referenced this issue Dec 13, 2023
Incorporate PR araddon#140 from
https://github.com/dferstay to fix
araddon#139

This also fixes araddon#155
(duplicate of issue 139)

PR is adapted to avoid duplicate code and validate format.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant