2 ms·
It seems you're using python. The standard lib's date and datetime classes are... not great. A purpose-made library like Delorean [1] or Pendulum [2] will help
by niftich 10y ago
It seems you're using python. The standard lib's date and datetime classes are... not great.
A purpose-made library like Delorean [1] or Pendulum [2] will help with handling dates, datetimes, and timezones greatly, despite being another tool to learn. Even Arrow [3], which is popular because of its Moment.js-inspired API, is better than using the builtins, despite muddying a few concepts and making some design choices that I (or the Pendulum author [4]) don't agree with.
In the Java world, Java 8's builtin Datetime API and its predecessor Joda-Time are quite possibly the most thoroughly thought-out, expertly designed datetime libraries that exist today. In my opinion, none of the python libraries quite measure up, but Delorean and Pendulum are pretty solid.
[1] http://delorean.readthedocs.io/en/latest/quickstart.html http://delorean.readthedocs.io/en/latest/quickstart.html [2] https://pendulum.eustace.io/ https://pendulum.eustace.io/ [3] http://crsmithdev.com/arrow/ http://crsmithdev.com/arrow/ [4] https://pendulum.eustace.io/faq/#why-not-arrow https://pendulum.eustace.io/faq/#why-not-arrow