[Python-Dev] datetime module enhancements
Jon Ribbens
jon+python-dev at unequivocal.co.uk
Sat Mar 10 12:36:16 CET 2007
"Phillip J. Eby" <pje at telecommunity.com> wrote:
> At 09:20 PM 3/9/2007 +0000, Jon Ribbens wrote:
> >If you want the answer to be "the entire of that day" then you need
> >to alter the datetime module so that, e.g. subtracting 2007-03-08
> >from 2007-03-09 does not return "one day" as currently, but returns
> >"zero days" instead (since of course there is no time between the end
> >of one day and the start of the next day).
>
> Unless you decide that subtraction is between days' ends. Or days'
> beginnings. Either suffices to produce a 1-day result in that case, and is
> still consistent with viewing days as slices of time.
So you're deciding that a 'date' is 'the entire of that day', except
when you subtract two of them, when it suddenly means something else? ;-)
More information about the Python-Dev
mailing list