A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-March/043165.html below:

[Python-Dev] dateutil

[Python-Dev] dateutil [Python-Dev] dateutilChristian Tanzer tanzer at swing.co.at
Tue Mar 16 12:14:43 EST 2004
> > I don't know. The problem here is that it is not obvious what is going
> > to happen. Consider:
> >
> > d1 = date(2004, 1, 31)
> > d2 = date(2004, 1, 28)
> >
> > d1_1 = d1 + relativedelta(months=1)
> > d2_1 = d2 + relativedelta(months=1)
>
> It's obvious to me, and should be obvious to anyone who knows the
> behavior of this class. They'll land on Feb/29 and Feb/28,
> respectively.
>
> > If you subscribe to d1_1 == d2_1, what do you expect to be the result
> > of:
>
> Why would I 'subscribe' to that?
>
> > d1_1 + relativedelta(months=1)
> > d2_1 + relativedelta(months=1)
> >
> > Whatever you choose it will be seriously inconsistent from one point
> > of view or another.
>
> They'll land on Mar/29 and Mar/28? Where's the incosistency!?

Slapping my forehead: I used the wrong year. How about 2003?

-- 
Christian Tanzer                                    http://www.c-tanzer.at/


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4