-
Notifications
You must be signed in to change notification settings - Fork 128
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
Error parsing when current day is not in month #74
Comments
I wasn't aware of this behaviour and something I will have to look into the usage of |
this is related also to this bug i think? #99 |
@gordol was this related, can this be closed? |
It's a dateutil issue upstream. Not fixed and they aren't planning to fix any time soon it seems. |
@gordol did they give a reason? |
i think this is actually a different bug... dateutil/dateutil#149 (comment) that is the reason given. basically, it implements an old RFC. |
delorean basically just implements dateutil.parser.parse
Anyway, this led me down a journey into dateutil... and it seems this may have been fixed in 2.5? currently delorean lists dateutil 2.4.2 as the required version. however, i think there are some other issues in dateutil after 2.5.1... so you may want to stick with 2.5.1 for now. see the changelog here where this was fixed in 2.5.0: |
2.6 has a new parsing overhaul, so maybe give it a whirl? |
you can pass a default date to the parse() method also... to work around this. or you can simply set the first day of your date string to "1" to be first day of month. by default it uses the current day's date. |
Hi,
Since
delorean.parse()
fills missing info from the string with the current date, it will fail if trying to parse a date with month if your current day is out of that month.An example to make it clear:
What would be the correct approach to parse this kind of strings? Is there a way to parse without filling the missing information with the current date (for example with day 1, hour 0 etc)?
The text was updated successfully, but these errors were encountered: