How to add months to a date (datetime object)?

Peter Pearson ppearson at nowhere.invalid
Mon Mar 16 15:59:29 CET 2009

On Sun, 15 Mar 2009 16:27:01 -0400, Roy Smith <roy at> wrote:
> In article <mailman.1915.1237140862.11746.python-list at>,
>  Chris Rebert <clp2 at> wrote:
>> Besides your behavior, one could equally well argue that a 31st repeat
>> on months without a 31st should just be dropped, or that it should
>> carry over onto the 1st of the next month (ignoring the complications
>> of February). Which behavior one needs is completely
>> context-dependent.
> Indeed.  For example, my wife started her current job on a
> Feb 29th.  There are significant financial events that
> happen on various anniversaries of her employment (vesting
> of stock and retirement benefits).  It really is important
> that everybody know exactly what is meant by "10 years
> from Feb 29th, on a given year", and what it means in one
> context may not mean what it means in another.

Remember Frederic, in Pirates of Penzance, who was apprenticed
to a pirate until his twenty-first birthday, but was born on
Feb 29?

To email me, substitute nowhere->spamcop, invalid->net.

More information about the Python-list mailing list