pep proposal : A date object for the standard library

Harald Hanche-Olsen hanche at math.ntnu.no
Tue Dec 11 16:30:07 EST 2001


+ Greg Ewing <greg at cosc.canterbury.ac.nz>:

| People are very used to the idea of a date and a time
| of day going together and specifying a point in time.
| Having separate Date and TimeOfDay classes may be a
| good idea, but many people are going to be disappointed
| if there isn't also a DateTime class that blends
| them smoothly together somehow.

No, no, no.  I never meant to advocate a TimeOfDay class without
reference to the date.  If you need to specify a time, you need the
date to go with it, or the time is useless.  So there should be a Date
or Calendar class that merely understands dates and calendars, with no
reference to time of day.  And there should be a Time class, which
specifies a time by giving both the date (from the former class) and a
time of day.  (Complete with time zone information.)  All I'm saying
is that the first module needs to be nailed down dead solid before
you even start tackling the second.

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- Yes it works in practice - but does it work in theory?



More information about the Python-list mailing list