Python time class

David Bolen db3l at fitlinxx.com
Fri May 18 18:21:22 EDT 2001


"Werner Geuens" <wgeuens at pandora.be> writes:

> I know: the proposal is not very clear yet. But in a nutshell: what do you
> think about designing/writing a new, clean, logical, platforms-independant
> date/time class and propose for it to be included as the base time class in
> a future release of Python?

I'd probably check out mxDateTime (http://www.lemburg.com/files/python) 
first and see how close it was to what I was thinking about.

True, it originated primarily to deal with databases, but I find it's
a well structured and pretty complete class.  Gives you date, time,
datetime and relative classes, complete with conversions, calculations
and all sorts of other stuff.  It's not part of the Python standard
library, but openly available, full source and easy to add-on to an
installation.

About the only thing I've found that could use a touch of work is
handling timezones and daylight savings time boundaries as part of
time computations.  To be fair though, the package is up front about
punting on the complexity of that and designed to permit it to be
offloaded to subclasses, with a small example.  It would just be nice
if the default distribution was a bit more fleshed out in this area,
but for the price I'm not complaining :-)

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list