This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Decorater, belopolsky, docs@python, serhiy.storchaka
Date 2017-03-21.08:50:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1490086236.83.0.910859744561.issue29866@psf.upfronthosting.co.za>
In-reply-to
Content
In that case you can publish your code as a receipt or as a module on PyPI. If it will be popular enough we can consider including it in the stdlib.

Currently your code is just broken.

>>> datetime.datetime_diff(datetime.datetime(2017, 1, 31), datetime.datetime(2017, 1, 31))
' ago.'
>>> datetime.datetime_diff(datetime.datetime(2016, 12, 31, 23, 59, 59), datetime.datetime(2017, 1, 1))
'1 years ago.'
>>> datetime.datetime_diff(datetime.datetime(2016, 1, 31), datetime.datetime(2017, 1, 31, 1))
'1 years1 hours ago.'
History
Date User Action Args
2017-03-21 08:50:36serhiy.storchakasetrecipients: + serhiy.storchaka, belopolsky, docs@python, Decorater
2017-03-21 08:50:36serhiy.storchakasetmessageid: <1490086236.83.0.910859744561.issue29866@psf.upfronthosting.co.za>
2017-03-21 08:50:36serhiy.storchakalinkissue29866 messages
2017-03-21 08:50:36serhiy.storchakacreate