Skip to main content

Production: travismaster

Development: travisdevelop

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

Release files for whenpy 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for whenpy 0.3.0
File Size Uploaded
whenpy-0.3.0.tar.gz 12.9 kB Details

Release files / whenpy-0.3.0.tar.gz

Download URL whenpy-0.3.0.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5faa8fb58588dc76f6e5af4aa32e73c6d101c953c53bc8ba9186e8845f7a63a5
BLAKE2b-256 checksum
How to use checksums
591a57b98db428fac9ab48aa8331384e3196da58f1b00a6ad1c1863514124ec2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3.0 This release

1 release file

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page