The same applies to getStringFromDateTime() as well

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Simen Haugen
Sent: 29. januar 2008 13:15
To: Dabo developers' list
Subject: Re: [dabo-dev] dates.py - getStringFromDate()

I actually have no idea :)

strftime uses time.localtime() as default if not supplying the tuple.
time.localtime() returns the month and date as the last values... It's
not documented, so I just checked what localtime returned.

So the tuple is (year, month, day, hour, minute, second, month, day,
?)... Seems very odd.

I recommend doing the d.strftime(fmt) instead as it's more intuitive.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Uwe Grauer
Sent: 29. januar 2008 12:56
To: Dabo developers' list
Subject: Re: [dabo-dev] dates.py - getStringFromDate()

Simen Haugen wrote:
> The recent change (18jan) to dates.py getStringFromDate() breaks my
code
> 
>       return time.strftime(fmt, (d.year, d.month, d.day, 0, 0, 0, 0,
> 0, 0))
> 

The above tuple represents a datetime object.

> Should be
> 
>       return time.strftime(fmt, (d.year, d.month, d.day, 0, 0, 0,
> d.month, d.day, 0))
> 

Can you explain the meaning of the tuple you used?

Uwe



[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]

Reply via email to