Skip to main content

Wrapper around business-python to control days in django

Project description

django-business-days

Wrapper around business-python with days in your admin.

Installation

$ pip install django-business-days

Add django_business_days to INSTALLED_APPS

How to use it

from django_business_days.calendar import get_calendar
from datetime import timedelta

# Note: django applications must be ready, because
# queries are made during initialization
calendar = get_calendar()

# Next just use class-API from `business-python`
calendar.is_business_day("Monday, 8 June 2020")

input_date = Calendar.parse_date("Saturday, 14 June 2014")
calendar.business_days_between(input_date, input_date + timedelta(days=7))

TODO:

  • Add tests

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

django-business-days-0.2.0.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

django_business_days-0.2.0-py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 3

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