Skip to main content

Holidays and working days calculations

Project description

Workingless is a lib for holidays calculations. Currently it supports Colombia holidays. Mexico coming soon.

Usage

Workingless has two methods for the countries supported, they are: get_holidays_from_year and is_holiday.

Example usage:

import datetime

from workingless import countries

colombia = countries.COL()
holidays = colombia.get_holidays_from_year(year=2020)
print(type(holidays))  # <class 'generator'>
print(list(holidays))
# result:
# [
#     datetime.date(2020, 1, 1),
#     datetime.date(2020, 1, 6),
#     datetime.date(2020, 3, 23),
#     datetime.date(2020, 4, 5),
#     datetime.date(2020, 4, 9),
#     datetime.date(2020, 4, 10),
#     datetime.date(2020, 4, 12),
#     datetime.date(2020, 5, 1),
#     datetime.date(2020, 5, 25),
#     datetime.date(2020, 6, 15),
#     datetime.date(2020, 6, 22),
#     datetime.date(2020, 6, 29),
#     datetime.date(2020, 7, 20),
#     datetime.date(2020, 8, 7),
#     datetime.date(2020, 8, 17),
#     datetime.date(2020, 10, 12),
#     datetime.date(2020, 11, 2),
#     datetime.date(2020, 11, 16),
#     datetime.date(2020, 12, 8),
#     datetime.date(2020, 12, 25)
# ]
colombia.is_holiday(date=datetime.date(2020, 1, 1))  # True

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for workingless, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size workingless-0.1.1-py3-none-any.whl (23.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size workingless-0.1.1.tar.gz (7.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page