You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was most certainly not an ambiguous change, and probably can be patched in a bugfix release. The 2.5.2 release doesn't have much in it (mainly it was just released to update the tzdata update), so I suggest using the 2.5.1 release if possible until we can get out a fix.
The fix in #234 only works when the day part of YYYY-MM-DD is <= 12. I suppose you might want to support YYYY-DD-MM (!) - SQL Server uses this format for some languages.
@rupert I'm not sure I understand the issue. 2015-01-13 is unambiguously YYYY-DD-MM. No other interpretation of those values constructs a valid date. The fundamental assumption of the parser is that you gave it a valid date, and it will be as charitable as possible in interpreting that date.
See my comments on #214 if you want dayfirst or yearfirst to be strict.
Yes 2015-01-13 is handled correctly, the issue is with 2015-01-02 being parsed as YYYY-DD-MM instead of YYYY-MM-DD (i.e. the 2.5.1 behaviour is correct).
That is the intended behavior change for dateutil version 2.5.2 - the combination of dayfirst and yearfirst are used to disambiguate between ymd, ydm, dmy, mdy as the "default" order for ambiguous triplets. See #81 and #238 for more details on how these work. At some point relatively soon, I will update the documentation with the chart in #238.
Yes setting it to False works. Originally I wasn't sure if this was an intended change. Thanks for clarifiying; I'm actually now using dateutil directly.
delorean has some documentation for dayfirst and yearfirst which needs updating. I'll add a comment to the other issue. Thanks.
Activity
pganssle commentedon Mar 28, 2016
This was most certainly not an ambiguous change, and probably can be patched in a bugfix release. The 2.5.2 release doesn't have much in it (mainly it was just released to update the
tzdataupdate), so I suggest using the 2.5.1 release if possible until we can get out a fix.pganssle commentedon Mar 28, 2016
Note - if anyone goes to fix this before I get around to it, please work off the
2.5.xbranch, not the themasterbranch.ignore dateutil 2.5.3 due to dateutil/dateutil#233
rupert commentedon Apr 29, 2016
The fix in #234 only works when the day part of
YYYY-MM-DDis<= 12. I suppose you might want to supportYYYY-DD-MM(!) - SQL Server uses this format for some languages.In 2.5.1:
In 2.5.3:
Delorean bug: myusuf3/delorean#87
pganssle commentedon Apr 29, 2016
@rupert I'm not sure I understand the issue.
2015-01-13is unambiguously YYYY-DD-MM. No other interpretation of those values constructs a valid date. The fundamental assumption of the parser is that you gave it a valid date, and it will be as charitable as possible in interpreting that date.See my comments on #214 if you want
dayfirstoryearfirstto be strict.rupert commentedon Apr 29, 2016
Yes
2015-01-13is handled correctly, the issue is with2015-01-02being parsed asYYYY-DD-MMinstead ofYYYY-MM-DD(i.e. the 2.5.1 behaviour is correct).Day and month swapped in 2.5.3:
rupert commentedon Apr 29, 2016
To be honest this is more a problem with delorean defaulting
dayfirsttoTrue: https://github.com/myusuf3/delorean/blob/064bc8d0716e06838f11ac38fbf3e56ec63c4e76/delorean/interface.py#L15pganssle commentedon Apr 29, 2016
Just set it to
False?That is the intended behavior change for dateutil version 2.5.2 - the combination of
dayfirstandyearfirstare used to disambiguate betweenymd,ydm,dmy,mdyas the "default" order for ambiguous triplets. See #81 and #238 for more details on how these work. At some point relatively soon, I will update the documentation with the chart in #238.rupert commentedon Apr 29, 2016
Yes setting it to
Falseworks. Originally I wasn't sure if this was an intended change. Thanks for clarifiying; I'm actually now usingdateutildirectly.deloreanhas some documentation fordayfirstandyearfirstwhich needs updating. I'll add a comment to the other issue. Thanks.Update quantum self-tests to take into account changes in dateutil.