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.

Source Distribution

workingless-0.2.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

workingless-0.2.0-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

Details for the file workingless-0.2.0.tar.gz.

File metadata

  • Download URL: workingless-0.2.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.5

File hashes

Hashes for workingless-0.2.0.tar.gz
Algorithm Hash digest
SHA256 61231793fb437a642e737d48ebadc6ef9363ef99f54bfe9f76ff2034e7ec9979
MD5 d4fd9a67428423396c0e6f0413b736e4
BLAKE2b-256 abb3f66c063f15aad6bc486314f357b912b25ab2b80b38449878334deec6c094

See more details on using hashes here.

File details

Details for the file workingless-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: workingless-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 29.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.5

File hashes

Hashes for workingless-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 006e417d1aa53f2abaeb10553d09b2f0ae6b6c151ab765bfd52ba2f597e420e6
MD5 1723d3181faa9e1f22587df1aff8759b
BLAKE2b-256 1d2ec2e7623d6d8df495ac6045259e6281f509712954c476e3e4f63aed424de2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page