-
Notifications
You must be signed in to change notification settings - Fork 129
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
python_dateutil 2.5.2 breaks parsing #87
Comments
python-dateutil 2.5.3 parses the above correctly. However there's another issue with the day and month being swapped: >>> from delorean import parse
>>> parse('2015-01-02').date
datetime.date(2015, 2, 1)
>>> parse('2015-01-13').date
datetime.date(2015, 1, 13) Downgrading to 2.5.1 is a temporary workaround. |
Looks like there is a bug with the In python-dateutil 2.5.1: >>> from dateutil.parser import parse
>>> parse('2015-01-02')
datetime.datetime(2015, 1, 2, 0, 0)
>>> parse('2015-01-02', dayfirst=True)
datetime.datetime(2015, 1, 2, 0, 0) In python-dateutil 2.5.3: >>> from dateutil.parser import parse
>>> parse('2015-01-02')
datetime.datetime(2015, 1, 2, 0, 0)
>>> parse('2015-01-02', dayfirst=True)
datetime.datetime(2015, 2, 1, 0, 0) dateutil bug: dateutil/dateutil#233 (comment) |
In the latest version of Might want to consider defaulting |
@rupert any chance you want to make this switch add tests and update documentation? |
Unfortunately I don't think you can handle ISO 8601 dates and something like
>>> parse('2003-02-01', dayfirst=False)
datetime.datetime(2003, 2, 1, 0, 0)
>>> parse('01/02/2003', dayfirst=False) # wrong
datetime.datetime(2003, 1, 2, 0, 0)
>>> parse('2003-02-01', dayfirst=True) # wrong
datetime.datetime(2003, 1, 2, 0, 0)
>>> parse('01/02/2003', dayfirst=True)
datetime.datetime(2003, 2, 1, 0, 0) Possibly you could attempt to parse the date with the As an aside I'm actually not using This is a duplicate of #84. |
Another option is pinning See this comment: dateutil/dateutil#229 (comment) |
It seems that recently (3/27) there was a new version of python_dateutil released (2.5.2) that breaks parsing of strings. I'm able to work around this by pinning python_dateutil to 2.5.1.
The text was updated successfully, but these errors were encountered: