Skip to content

SuadeLabs/whenever-none

 
 

Repository files navigation

⏰ Whenever-None

A slightly friendlier fork of whenever handling comparison with None

This is a slightly niche fork of the excelent whenever library for handling comparison against null values. For our purposes, we count None as, essentially, year zero:

>>> from whenever import Instance

>>> Instance.now() > None
True

You can install this library as a drop-in replacement without changing your code:

pip install whenever-none  # install this library
python -c "import whenever"  # use it like whenever

Why use whenever-none?

If you want all the nice features of whenever, but often deal with poor quality data 💩 or data exploration 🔍, this library allows a lot of common python operations to proceed (e.g. sorting a list of Person instances by their .bith_date property) without requiring too much (or incorrect) massaging of the data.

About

⏰ Modern datetime library for Python

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 52.4%
  • Rust 47.4%
  • Makefile 0.2%