Red Hat business days calendar
Project description
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
Release history Release notifications | RSS feed
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.6.tar.gz
(4.4 kB
view details)
File details
Details for the file rhcalendar-1.3.6.tar.gz
.
File metadata
- Download URL: rhcalendar-1.3.6.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 835942adc244c43cc02db1db308fb9abc33fd05415814a775b548544687bc121 |
|
MD5 | 64144f74ac7cb656f8a93e663a6fefb9 |
|
BLAKE2b-256 | de59d104fdc817dc279358fb7f0b6aafc33e6e03f83a14921f0ace34706ecf55 |