Answers for "human readable time difference python"

1

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'
Posted by: Guest on June-01-2021

Code answers related to "human readable time difference python"

Python Answers by Framework

Browse Popular Code Answers by Language