Skip to main content

Red Hat business days calendar

Project description

https://travis-ci.org/ktdreyer/rhcalendar.svg?branch=master 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(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 only has the Red Hat US holiday calendar. Contributions welcome for other locales.

# Only locale option is 'en-US' (the default) for now.
days = workdays(from_date, to_date, locale='en-US')

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.1.0.tar.gz (3.9 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: rhcalendar-1.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rhcalendar-1.1.0.tar.gz
Algorithm Hash digest
SHA256 8e1f336314d63a472c9d7e9b2e884bf3071ac6e483ee616b34e071c477fffc86
MD5 a8448865b21e6406414d70decf5d927b
BLAKE2b-256 32f62f0450c3c8a6e55fe9af64874f9526dfaeef8ebefab52f39d33b79d7a231

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