A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-January/032189.html below:

[Python-Dev] functions exposed by datetime

[Python-Dev] functions exposed by datetime [Python-Dev] functions exposed by datetimeGuido van Rossum guido@python.org
Wed, 15 Jan 2003 15:51:34 -0500
> 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/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4