[Zope-Coders] date module

Fred L. Drake, Jr. fdrake@acm.org
Mon, 21 Oct 2002 12:01:31 -0400


Andreas Jung writes:
 > I remember that Guido (?) has written a minimal datetime module
 > for Python to be used in Zope3 or so. Where can I find the sources?

Either I missed the response, or there wasn't one; sorry if you've had
to wait.

Guido & Tim wrote the Python module; it is maintained in Python's CVS
since it is planned for inclusion in Python 2.3.  I'm working on a C
version as time allows.  It can be found in the directory
python/nondist/sandbox/datetime/:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/python/python/nondist/sandbox/datetime/

Jim checked the Python version into the Zope 3 CVS as the datetime
package; you should be able to simply do:

from datetime import datatime

The module also defines the date, datetimetz, and timedelta types.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation