[issue12772] fractional day attribute in datetime class

Alexander Belopolsky report at bugs.python.org
Sat Aug 20 00:53:11 CEST 2011


Alexander Belopolsky <alexander.belopolsky at gmail.com> added the comment:

You can easily get the fractional day value using existing functionality:


>>> from datetime import *
>>> (datetime(2011,8,15,18,30) -  datetime(2011,8,13,12,0)) / timedelta(1)
2.2708333333333335
>>> (datetime(2011,8,15,18,30) -  datetime(1970,1,1)) / timedelta(1)
15201.770833333334

In some sense this request is a duplicate of issue2736.

----------
assignee:  -> belopolsky
nosy: +belopolsky
resolution:  -> rejected
stage:  -> committed/rejected
status: open -> pending

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12772>
_______________________________________


More information about the Python-bugs-list mailing list