Whenever – typed and DST-safe datetimes for Python
Published on: 2025-04-30 21:12:19
⏰ Whenever
Typed and DST-safe datetimes for Python, available in Rust or pure Python.
Do you cross your fingers every time you work with Python's datetime—hoping that you didn't mix naive and aware? or that you avoided its other pitfalls? There’s no way to be sure...
✨ Until now! ✨
Whenever helps you write correct and type checked datetime code, using well-established concepts from modern libraries in other languages. It's also way faster than other third-party libraries—and usually the standard library as well. If performance isn't your top priority, a pure Python version is available as well.
RFC3339-parse, normalize, compare to now, shift, and change timezone (1M times)
⚠️ Note: A 1.0 release is coming soon. Until then, the API may change as we gather feedback and improve the library. Leave a ⭐️ on GitHub if you'd like to see how this project develops!
Why not the standard library?
Over 20+ years, Python's datetime has grown out of step with what you'd expect from a modern d
... Read full article.