Skip to main content

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for whenpy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 30b0952c28029d56bb0050777fe161b6f56fdd77cbf075f8e04c3c57af0fe41b
MD5 324d083659366c14614039a011a70550
BLAKE2b-256 96031d32093eb99fda1199c7bd338598a70645b2dc08716360793c4c14b0f054

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