• This repository has been archived on 19/Dec/2019
  • Stars
    star
    191
  • Rank 195,572 (Top 4 %)
  • Language
    Python
  • License
    BSD 3-Clause "New...
  • Created about 12 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Friendly Python Dates

When.py: Friendly Dates and Times

No Maintenance Intended

Production: travismaster coverallsmaster

Development: travisdevelop coverallsdevelop

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