[Python-Dev] Python-Dev Digest, Vol 69, Issue 143

Tennessee Leeuwenburg tleeuwenburg at gmail.com
Fri Apr 17 04:10:59 CEST 2009

Actually, that's a point.

If its' the 31st of Jan, then +1 monthdelta will be 28 Feb and another +1
will be 28 March whereas 31st Jan +2 monthdeltas will be 31 March.

That's the kind of thing which really needs to be documented, or I think
people really will make mistakes.

For example, should a monthdelta include a goal-day so that the example
above would go 31 Jan / 28 Feb / 31 March?


On Fri, Apr 17, 2009 at 11:55 AM, Greg Ewing <greg.ewing at canterbury.ac.nz>wrote:

> Jess Austin wrote:
>  This is a perceptive observation: in the absence of parentheses to
>> dictate a different order of operations, the third quantity will
>> differ from the second.
> Another aspect of this is the use case mentioned right
> at the beginning of this discussion concerning a recurring
> event on a particular day of the month.
> If you do this the naive way by just repeatedly adding one
> of these monthdeltas to the previous date, and the date is
> near the end of the month, it will eventually end up
> drifting to the 28th of every month.
> --
> Greg
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/tleeuwenburg%40gmail.com

Tennessee Leeuwenburg
"Don't believe everything you think"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20090417/bffc5f2c/attachment.htm>

More information about the Python-Dev mailing list