[Python-Dev] datetime and timedelta enhancement

Nick Coghlan ncoghlan at gmail.com
Sun Nov 16 02:14:12 CET 2008


M.-A. Lemburg wrote:
> Guess I could add a .weeks attribute to mxDateTime, but no one ever
> asked for that so far.

Given that there are at least 3 different ways to define the number of
"weeks" between two dates, it may be something best left to applications
to worry about.

OOo implements 2 of them [1] for its WEEKS() function, and there's then
a fairly obvious 3rd variant based on a Sunday to Saturday week.

Cheers,
Nick.

[1]
http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Calc:_WEEKS_function



-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------


More information about the Python-Dev mailing list