Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

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 =
to_date =, 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."


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.

Files for rhcalendar, version 1.3.1
Filename, size File type Python version Upload date Hashes
Filename, size rhcalendar-1.3.1.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page