Alan Gauld wrote:
> "Kent Johnson" <[EMAIL PROTECTED]> wrote
>
>> Because of the ambiguities of month arithmetic (what is 2005-1-31
>> plus
>> one month?) datetime refuses to guess and does not support this.
>
>> The third-party dateutil module is not as circumspect:
>>
>> In [1]: import datetim
"Kent Johnson" <[EMAIL PROTECTED]> wrote
> Because of the ambiguities of month arithmetic (what is 2005-1-31
> plus
> one month?) datetime refuses to guess and does not support this.
> The third-party dateutil module is not as circumspect:
>
> In [1]: import datetime
>
> In [2]: startdate = date
thanks kent for your fast and comprehensive answer!
On 2/5/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
frank h. wrote:
> 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)
frank h. wrote:
> 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
> 711
> >> delta.months
> exceptions.AttributeError
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
711
delta.months
exceptions.AttributeErrorTraceback (most recent
ca