Date type
John Hunter
jdhunter at ace.bsd.uchicago.edu
Fri May 16 11:42:20 EDT 2003
>>>>> "Batista," == Batista, Facundo <FBatista at uniFON.com.ar> writes:
Batista> #- Tim Peters has developed a new datetime module for
Batista> python 2.3.
Batista> Same problem as above, I can't get Python updated.
You can't install software but you can use an external pure python
module, is that correct? I don't exactly see the logic there, but...
In any case, there is a pure python prototype of the 2.3 datetime
module that may work for you
I think this may be the most recent version, but am not sure
http://cvs.zope.org/*checkout*/Zope3/src/datetime/_datetime.py?rev=1.32.2.1&content-type=text/plain
Here is a test with that file, saved as datetime.py in a tmp dir
>>> from datetime import datetime
>>> d = datetime(2003,5,16)
>>> dir(d)
['__add__', '__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__radd__', '__reduce__', '__repr__', '__safe_for_unpickling__', '__setattr__', '__str__', '__sub__', '__weakref__', '_checkOverflow', '_date__cmp', '_date__day', '_date__getstate', '_date__month', '_date__setstate', '_date__year', '_datetime__cmp', '_datetime__day', '_datetime__getstate', '_datetime__hour', '_datetime__microsecond', '_datetime__minute', '_datetime__month', '_datetime__second', '_datetime__setstate', '_datetime__year', '_dst',
'_tzinfo', '_utcoffset', 'astimezone', 'combine', 'ctime', 'date', 'day', 'dst', 'fromordinal', 'fromtimestamp', 'hour', 'isocalendar', 'isoformat', 'isoweekday', 'max', 'microsecond', 'min', 'minute', 'month', 'now', 'replace', 'resolution', 'second', 'strftime', 'time', 'timetuple', 'timetz', 'today', 'toordinal', 'tzinfo', 'tzname', 'utcfromtimestamp', 'utcnow', 'utcoffset', 'utctimetuple', 'weekday', 'year']
Hope this helps,
John Hunter
More information about the Python-list
mailing list