Damian Yurzola <dam...@yurzola.net> added the comment:

Sorry I got my "current" wrong and I can't find the edit button
Here again:


> "How long is it until Christmas?"

# Current implementation
In [23]: datetime.datetime(2020, 12, 25) - datetime.datetime.today()
Out[23]: datetime.timedelta(days=71, seconds=53018, microseconds=941806)

# Hassan's
In [16]: datetime.datetime(2020, 12, 25) - 
datetime.datetime(datetime.datetime.today().year, 
datetime.datetime.today().month, datetime.datetime.today().day)
Out[16]: datetime.timedelta(days=72)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41904>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to