Skip to main content

Red Hat business days calendar

Project description

https://github.com/ktdreyer/rhcalendar/workflows/tests/badge.svg https://badge.fury.io/py/rhcalendar.svg

This module builds on workdays to provide a networkdays() method that knows about the Red Hat business holidays.

Example: determine number of business days from today

import datetime
from rhcalendar import networkdays

today = datetime.date.today()
to_date = datetime.date(2023, 1, 1)  # something far away...

days = networkdays(from_date=today, to_date=to_date)

print('%s is %d Red Hat business days from now.' % (to_date, days))
# prints "2023-01-01 is 522 Red Hat business days from now."

Locales

Currently this module has the Red Hat holiday calendars for the US and Quebec, Canada. Contributions welcome for other locales.

# Locale option defaults to 'en-US':
days = workdays(from_date, to_date)

# Or use Quebec, Canada holidays:
days = workdays(from_date, to_date, locale='qc-CA')

Packages that use this package

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

rhcalendar-1.3.0.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file rhcalendar-1.3.0.tar.gz.

File metadata

  • Download URL: rhcalendar-1.3.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for rhcalendar-1.3.0.tar.gz
Algorithm Hash digest
SHA256 ed4157440c09b98d385c27e348ad432f64f0dd8228dc703f764d470b78780b84
MD5 25ae1cd855c370aee809b9ae5b26b16c
BLAKE2b-256 d1043a9e6fc4517752796d5208f0b23e3a364b2e87c8b739aaeae276e1097daa

See more details on using hashes here.

Provenance

Supported by

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