[EMAIL PROTECTED]
> Hi, this is probably a really simple question but...
> How do you add a month to a datetime date in python? It would be nice
> if  you could do something like:
>
> d = datetime.date(2006,2,17)
> dm = datetime.timedelta(months=1)
> d_new = d + dm
>
> but timedelta doesn't have a 'months' setting. Am I missing some easy
> method or do I have to code a work around myself??

You need to code you own version.

It was not included with datetime.timedelta() because the definition is
ambiguous (i.e. what date is one month after Jan 30th?).


Raymond

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to