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(2020, 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 "2020-01-01 is 435 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.2.0.tar.gz
(4.2 kB
view details)
File details
Details for the file rhcalendar-1.2.0.tar.gz
.
File metadata
- Download URL: rhcalendar-1.2.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.2 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49474a33f932f23bb8393838702f58478f796f51982be2fdb5e1ece56992e1f8 |
|
MD5 | 51a0a86318c1c3c2a7a3b3b773176eda |
|
BLAKE2b-256 | e2ee83c50563c3ef4ea604d0893402d5f3db8f7fa783496f0fa409a1ee63ce6b |