[Python-Dev] datetime +/- scalars (int, long, float)?

M.-A. Lemburg mal@lemburg.com
Wed, 06 Mar 2002 22:14:08 +0100


Tim Peters wrote:
> 
> [Guido, on "naive time"]
> > ...
> > Naive time calculations are easier than local time calculations,
> > because they don't have to worry about DST.  You only have to be
> > careful when converting between naive time and UTC (or anything else
> > that has a concept of timezone).
> 
> [MAL]
> > Just to let you know: you are slowly narrowing in on mxDateTime ;-)
> > (the naive type is pretty much what I have implemented as
> > DateTime object).
> 
> It's not *that* slowly -- this started less than a week ago <wink>.  But,
> yes, Guido's basic class is heading more in the direction of what mxDateTime
> started as.  By the time you had need of documenting things like
> 
>     Adding/Subtracting DateTime instances causes the result to
>     inherit the calendar of the left operand.
> 
> I think "naive time" got lost in the options.  Guido has in mind a pure
> "proleptic Gregorian" gimmick.  We'll see how long that lasts ...

mxDateTime was purely Gregorian until I realized that all historic
dates are in fact referenced using the Julian calendar.

Note that mxDateTime doesn't try to be clever about the switch 
from one to the other: it simply provides both versions via 
methods or constructors.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting:                           http://www.egenix.com/
Python Software:                   http://www.egenix.com/files/python/