Also, Pendulum is not just about datetimes but also provides both the Interval class and Period class which are improvements over the native timedelta class.
And finally, it handles properly time shifting around DST transition times and normalization of datetimes when creating them which neither Delorean nor Arrow do well.
How can I do this with datetime+dateutil+pytz?
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 час назадI think Delorean, Pendulum, Arrow, etc, aim to make dealing with dates more understandable and less painful. It's perfectly possible to fully grasp all the technicalities of pytz/dateutil/datetime -- and I recommend that anybody who has to deal with dates and times in Python do so -- but if you'd rather not think about it all and are okay with deferring some control to the opinions of one of these libraries, that's when you probably pull them off the shelf instead of the aforementioned trio.
The README for Pendulum seems to show me one feature Delorean doesn't explicitly have -- `is_weekend()` -- otherwise these libraries are conceptually very similar.
I do agree that this (and Delorean) is a usability improvement over `datetime` and perhaps even Arrow (though I'm not tremendously familiar with Arrow).