[Python-checkins] CVS: python/nondist/sandbox/datetime datetime.py,1.9,1.10

Tim Peters tim.one@comcast.net
Sat, 02 Mar 2002 13:36:40 -0500


[Guido]
> + # XXX Why not borrow from calendar.py?

Primarily because it relies on platform mktime() and localtime(), which
can't be counted on outside of 1970-2038.  The Dates.py code is
self-contained, and works for all years.  Replace calendar's use of mktime()
with something that works everywhere for all years, and you'd end up
reinventing Dates.py.  If we're going to recode this in C some day, it's
vital to prototype algorithms that don't rely on inadequate C datetime
functions.