Friendly Python Dates

Overview

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
You might also like...
darts is a Python library for easy manipulation and forecasting of time series.
darts is a Python library for easy manipulation and forecasting of time series.

A python library for easy manipulation and forecasting of time series.

Make Python datetime formatting human readable

Make Python datetime formatting human readable

A simple digital clock made with the help of python
A simple digital clock made with the help of python

Digital-Clock ⏰ Description 📚 ✔️ A simple digital clock made with the help of python. The code is easy to understand and implement. With this reposit

A datetime parser in Python by Ari24-cb24 and NekoFantic

datetimeparser A datetime parser in Python by Ari24-cb24 and NekoFantic V 1.0 Erinnerung für den Parser Auf falsche Eingaben überprüfen Liste an Event

A Python 3 library for parsing human-written times and dates

Chronyk A small Python 3 library containing some handy tools for handling time, especially when it comes to interfacing with those pesky humans. Featu

A Python library for dealing with dates

moment A Python library for dealing with dates/times. Inspired by Moment.js and Kenneth Reitz's Requests library. Ideas were also taken from the Times

Better dates & times for Python

Arrow: Better dates & times for Python Arrow is a Python library that offers a sensible and human-friendly approach to creating, manipulating, formatt

python parser for human readable dates
python parser for human readable dates

Python parser for human readable dates Key Features • How To Use • Installation • Common use cases • You may also like... • License Key Features Suppo

🧮A simple calculator written in python allows you to make simple calculations, write charts, calculate the dates, and exchange currency.
🧮A simple calculator written in python allows you to make simple calculations, write charts, calculate the dates, and exchange currency.

Calculator 🖩 A simple calculator written in python allows you to make simple calculations, write charts, calculate the dates, and exchange currency.

Formatting of dates and times in Flask templates using moment.js.

Flask-Moment This extension enhances Jinja2 templates with formatting of dates and times using moment.js. Quick Start Step 1: Initialize the extension

Formatting of dates and times in Flask templates using moment.js.

Flask-Moment This extension enhances Jinja2 templates with formatting of dates and times using moment.js. Quick Start Step 1: Initialize the extension

Formatting of dates and times in Flask templates using moment.js.

Flask-Moment This extension enhances Jinja2 templates with formatting of dates and times using moment.js. Quick Start Step 1: Initialize the extension

Utility for working with recurring dates in Django.

django-recurrence django-recurrence is a utility for working with recurring dates in Django. Documentation is available at https://django-recurrence.r

CLI to show end-of-life dates for tools and technologies.

Python 3.9+ interface to endoflife.date to show end-of-life dates for tools and technologies.

Provide partial dates and retain the date precision through processing

Prefix date parser This is a helper class to parse dates with varied degrees of precision. For example, a data source might state a date as 2001, 2001

Short Program using Transavia's API to notify via email an user waiting for a flight at special dates and with the best price

Flight-Notifier Short Program using Transavia's API to notify via email an user waiting for a flight at special dates and with the best price Algorith

CLI tool to fix linked references for dates.

Fix Logseq dates This is a CLI tool to fix the date references following a change in date format since the current version (0.4.4) of Logseq does not

Chronocalc - Calculates the dates and times when the sun or moon is in a given position in the sky

Chronocalc I wrote this script after I was busy updating my article on chronoloc

UniPD exam dates finder

UniPD exam dates finder Find dates for exams at UniPD Usage ./finder.py courses.csv It's suggested to save output to a file: ./finder.py courses.csv

Comments
  • Add tox.ini for tox (http://tox.testrun.org/)

    Add tox.ini for tox (http://tox.testrun.org/)

    Passing Travis build: http://travis-ci.org/#!/msabramo/When.py/builds/1763857

    Sample tox output:

    ~/dev/git-repos/When.py$ tox
    GLOB sdist-make: /Users/marca/dev/git-repos/When.py/setup.py
    py26 sdist-reinst: /Users/marca/dev/git-repos/When.py/.tox/dist/whenpy-0.3.0.zip
    py26 runtests: commands[0]
    WARNING:test command found but not installed in testenv
      cmd: /usr/bin/make
      env: /Users/marca/dev/git-repos/When.py/.tox/py26
    Maybe forgot to specify a dependency?
    nosetests ./tests/*
    ..................................
    ----------------------------------------------------------------------
    Ran 34 tests in 0.015s
    
    OK
    py27 sdist-reinst: /Users/marca/dev/git-repos/When.py/.tox/dist/whenpy-0.3.0.zip
    py27 runtests: commands[0]
    WARNING:test command found but not installed in testenv
      cmd: /usr/bin/make
      env: /Users/marca/dev/git-repos/When.py/.tox/py27
    Maybe forgot to specify a dependency?
    nosetests ./tests/*
    ..................................
    ----------------------------------------------------------------------
    Ran 34 tests in 0.016s
    
    OK
    py32 sdist-reinst: /Users/marca/dev/git-repos/When.py/.tox/dist/whenpy-0.3.0.zip
    py32 runtests: commands[0]
    WARNING:test command found but not installed in testenv
      cmd: /usr/bin/make
      env: /Users/marca/dev/git-repos/When.py/.tox/py32
    Maybe forgot to specify a dependency?
    nosetests ./tests/*
    ..................................
    ----------------------------------------------------------------------
    Ran 34 tests in 0.015s
    
    OK
    py33 sdist-reinst: /Users/marca/dev/git-repos/When.py/.tox/dist/whenpy-0.3.0.zip
    py33 runtests: commands[0]
    WARNING:test command found but not installed in testenv
      cmd: /usr/bin/make
      env: /Users/marca/dev/git-repos/When.py/.tox/py33
    Maybe forgot to specify a dependency?
    nosetests ./tests/*
    ..................................
    ----------------------------------------------------------------------
    Ran 34 tests in 0.017s
    
    OK
    _________________________________________________________________________ summary __________________________________________________________________________
      py26: commands succeeded
      py27: commands succeeded
      py32: commands succeeded
      py33: commands succeeded
      congratulations :)
    
    opened by msabramo 0
Owner
Andy Dirnberger
Andy Dirnberger
A Python library for dealing with dates

moment A Python library for dealing with dates/times. Inspired by Moment.js and Kenneth Reitz's Requests library. Ideas were also taken from the Times

Zach Williams 709 Dec 9, 2022
Better dates & times for Python

Arrow: Better dates & times for Python Arrow is a Python library that offers a sensible and human-friendly approach to creating, manipulating, formatt

Arrow 8.2k Jan 5, 2023
python parser for human readable dates

Python parser for human readable dates Key Features • How To Use • Installation • Common use cases • You may also like... • License Key Features Suppo

Scrapinghub 2.2k Jan 8, 2023
Useful extensions to the standard Python datetime features

dateutil - powerful extensions to datetime The dateutil module provides powerful extensions to the standard datetime module, available in Python. Inst

null 2k Dec 29, 2022
Python datetimes made easy

Pendulum Python datetimes made easy. Supports Python 2.7 and 3.4+. >>> import pendulum >>> now_in_paris = pendulum.now('Europe/Paris') >>> now_in_par

Sébastien Eustace 5.3k Jan 6, 2023
PyTime is an easy-use Python module which aims to operate date/time/datetime by string.

PyTime PyTime is an easy-use Python module which aims to operate date/time/datetime by string. PyTime allows you using nonregular datetime string to g

Sinux 148 Dec 9, 2022
pytz Python historical timezone library and database

pytz Brings the IANA tz database into Python. This library allows accurate and cross platform timezone calculations. pytz contains generated code, and

Stub 236 Jan 3, 2023
Generate and work with holidays in Python

python-holidays A fast, efficient Python library for generating country, province and state specific sets of holidays on the fly. It aims to make dete

Maurizio Montel 881 Dec 29, 2022
A Python module that tries to figure out what your local timezone is

tzlocal This Python module returns a tzinfo object with the local timezone information under Unix and Windows. It requires either Python 3.9+ or the b

Lennart Regebro 159 Dec 16, 2022
A simple in-process python scheduler library, designed to be integrated seamlessly with the `datetime` standard library.

scheduler A simple in-process python scheduler library, designed to be integrated seamlessly with the datetime standard library. Due to the support of

null 30 Dec 30, 2022