bpo-29866: Added datetime_diff to datetime.py. by AraHaan · Pull Request #749 · python/cpython (original) (raw)

The datetime_diff function compares two datetime objects and returns the
time since the prior datetime objects (based on the current datetime
object) in a what that is readable by humans.

This is useful when one might need to compare two datetime objects,
keeping ones codebase as small as possible (to ensure fast Python code),
and to reduce 'hacks' in their code to make the comparison more readable
by humans