Skip to main content

Friendly Dates and Times

Project description

https://secure.travis-ci.org/dirn/When.py.png?branch=master

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.2.0.tar.gz (7.2 kB view details)

Uploaded Source

File details

Details for the file whenpy-0.2.0.tar.gz.

File metadata

  • Download URL: whenpy-0.2.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for whenpy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 187f2a1d83aa9df4c9bc281608c54cd1e1875ed395d3774db6855605a272a622
MD5 487c8d34c7e6c682292a14adc8aa0f04
BLAKE2b-256 9db3e10033c89effba4dc4904d0c2a7ed10ec890921ded6110fa6327d7504ad6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page