Friendly Dates and Times
Project description
User-friendly functions to help perform common date and time actions.
Usage
To get the system time zone’s name:
when.timezone()
To get the current date:
when.today()
To get tomorrow’s date:
when.tomorrow()
To get yesterday’s date:
when.yesterday()
To get a datetime one year from now:
when.future(years=1)
To convert to a different time zone:
when.shift(value, from_tz='America/New_York', to_tz='UTC')
To get the current time:
when.now()
Full documentation can be found on Read the Docs.
Installation
Installing When.py is easy:
pip install whenpy
or download the source and run:
python setup.py install
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
whenpy-0.1.0.tar.gz
(5.4 kB
view details)
File details
Details for the file whenpy-0.1.0.tar.gz
.
File metadata
- Download URL: whenpy-0.1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e10221edddee6642bf7b14af1a0b6499482add42ea3e062a6374d30daadb8b5e |
|
MD5 | 98913d00b600eb13cbb7b0f7b6cb7e1f |
|
BLAKE2b-256 | 610d4dca08fa1f06f91781a144e577a4d886bf1c41ebdc29fcfc47d2ab48c87b |