User-friendly functions to help perform common date and time actions.
To get the system time zone's name:
To get the current date:
To get tomorrow's date:
To get yesterday's date:
To get a datetime one year from now:
To convert to a different time zone:
when.shift(value, from_tz='America/New_York', to_tz='UTC')
To get the current time:
Full documentation can be found on Read the Docs.
Installing When.py is easy:
pip install whenpy
or download the source and run:
python setup.py install