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

Date format of DD.MM.YYYY HH:MM:SS not supported #129

Open
krisavi opened this issue Jul 15, 2021 · 3 comments · May be fixed by #159
Open

Date format of DD.MM.YYYY HH:MM:SS not supported #129

krisavi opened this issue Jul 15, 2021 · 3 comments · May be fixed by #159

Comments

@krisavi
Copy link

krisavi commented Jul 15, 2021

Tried also with dateparse.RetryAmbiguousDateWithSwap(true) option. Using Debugger it is visible it switches the flag, but it still finds the month to be out of range. Seems like it does not try to parse it with correct format still.

From the parser object it is visible it still has dayi and daylen set to cover 4th and 5th char and moi and molen to cover first and second char which is wrong.

parsing time "15.07.2021 05:37:00": month out of range

As also stated #91 then the majority of locales using dot notation are either DD.MM.YYYY or YYYY.MM.DD

@mehanizm
Copy link

mehanizm commented Aug 9, 2021

Hi, @krisavi
I've fixed that in the PR #133

You can use my fork while it is waiting for a merge
go get github.com/mehanizm/dateparse@f82c8742c9f8

@krisavi
Copy link
Author

krisavi commented Sep 24, 2021

For me I ended up rewriting the part that was supposed to use dateparse to accept Go date format as guideline for parsing dates.

@alhamsya
Copy link

@mehanizm why you fork the repo ? maybe better create PR to fix it.

klondikedragon added a commit to itlightning/dateparse that referenced this issue Dec 12, 2023
Incorporates PR araddon#133 from https://github.com/mehanizm to fix araddon#129

Adds test cases to verify the following are already fixed:
* araddon#105
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants