This question is similar to this question about subtracting dates with Python, but not identical. I\'m not dealing with strings, I have to figure out the difference between
Check out the humanize package
https://github.com/jmoiron/humanize
import datetime humanize.naturaltime(datetime.datetime.now() - datetime.timedelta(seconds=1)) 'a second ago' humanize.naturaltime(datetime.datetime.now() - datetime.timedelta(seconds=3600)) 'an hour ago'