[Tutor] timedelta doesnt do month

frank h. frank.hoffsummer at gmail.com
Mon Feb 5 19:55:37 CET 2007

so what is the easiest way to to get to a list of months in a given
timeinterval, e.g.

>> startdate = datetime.date(2005,2,13)
>> enddate = datetime.date(2007,1,25)
>> delta = enddate - startdate
>> delta.days
>> delta.months
exceptions.AttributeError                            Traceback (most recent
call last)
AttributeError: 'datetime.timedelta' object has no attribute 'months'

I want to compute the "monthdifference" and so I can then iterate over the
months from my startdate to my enddate
what is the easiest way to accomplish this?
thanks for any insight you might have
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070205/ad992c5e/attachment.htm 

More information about the Tutor mailing list