human readable time difference python code example
Example: human readable time difference python
# pip install humanize
import humanize
date = datetime(2021, 6, 2, 8, 15, 0)
now = datetime.now()
humanize.precisedelta(date - now, minimum_unit="seconds", format="%d")
# '9 hours, 28 minutes and 59 seconds'