Type-safe datetimes for Python that get DST right, in Rust or pure Python
Actively maintained. Last release 2 weeks ago, commits in 21 of the last 26 weeks. A safe choice.
pip install whenever⏰ Whenever
Type-safe datetimes for Python that get DST right. Rust or pure Python, your choice.
Do you cross your fingers every time you work with Python's datetime—hoping that you didn't mix naive and aware, or run into one of its other pitfalls?
Whenever takes the guesswork out, bringing well-established concepts from modern libraries in other languages to Python. Mixing up naive and aware becomes a typechecker error instead of a bug you find in production, and DST is handled correctly in all arithmetic. It's also way faster than other third-party libraries, and usually the standard library as well. Rather not depend on a Rust extension? A pure-Python backend is available too.
Parse, normalize, compare to now, shift, change time zone, and format (1M times)
📖 Docs | 🐍 PyPI | 🚀 Changelog | ❓ FAQ | 🐛 Issues |