Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Pendulum – Python datetimes made easy. Parent comment
http://babel.pocoo.org/en/latest/api/dates.html
humanize is apparently a human-readable directioned delta, so that'd be format_timedelta(delta, add_direction=True)
>>> print format_timedelta(ref - datetime.now(), add_direction=True) 1 hour ago >>> print format_timedelta(ref - datetime.now(), add_direction=True, locale='zh') 1小时前 >>> print format_timedelta(ref - datetime.now(), add_direction=True, locale='ru') 1 час назад
There are no comments on this comment yet.
http://babel.pocoo.org/en/latest/api/dates.html
humanize is apparently a human-readable directioned delta, so that'd be format_timedelta(delta, add_direction=True)