[Python-Dev] functions exposed by datetime (original) (raw)
Guido van Rossum guido@python.org
Wed, 15 Jan 2003 15:51:34 -0500
- Previous message: [Python-Dev] functions exposed by datetime
- Next message: [Python-Dev] test_logging failing on Windows 2000
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
The more I read about "datetime", I am beginning to realize that like "mxDateTime", it is a needlessly awkward to use for people who want to cheaply turn a calendar date into a 32 bit integer, and back again.
Is the following really too awkward?
from datetime import * a = date.today() b = date(1956, 1, 31) a-b datetime.timedelta(17151) (a-b).days 17151
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] functions exposed by datetime
- Next message: [Python-Dev] test_logging failing on Windows 2000
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]