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))
> 
> Should be
> 
>       return time.strftime(fmt, (d.year, d.month, d.day, 0, 0, 0,
> d.month, d.day, 0))


Hmm. Tuple items 6 and 7 are documented to be for weekday (0-6) and 
Julian Day (1-366). As these values don't have any bearing when 
converting dates from/to datetime.date and strings I thought leaving 
them at 0 was sufficient.

What breaks, specifically? And I wonder why sending the month and day 
again would fix it?

> It's also worth noting that it could be simpler by using (as the dates
> strftime supports the same)
> 
>       return d.strftime(fmt)


I was using d.strftime(fmt) however it suffered from not being able to 
deal with dates before 1900.


Paul

-- 
http://paulmcnett.com


_______________________________________________
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