business_calendar
business_calendar is a Python package that implements simple business days calculations. You can use a custom work week and a holiday list.
Documentation
You can find the latest documentation here.
Example
from business_calendar import Calendar, MO, TU, WE, TH, FR
import datetime
date1 = datetime.datetime(2013,1,10)
# normal calendar, no holidays
cal = Calendar()
date2 = cal.addbusdays(date1, 25)
print('%s days between %s and %s' % \
(cal.busdaycount(date1, date2), date1, date2))
# don't work on Fridays? no problem!
cal = Calendar(workdays=[MO,TU,WE,TH])
date2 = cal.addbusdays(date1, 25)
print('%s days between %s and %s' % \
(cal.busdaycount(date1, date2), date1, date2))
# holiday? no problem!
cal = Calendar(workdays=[MO,TU,WE,TH], holidays=['2013-01-17'])
date2 = cal.addbusdays(date1, 25)
print('%s days between %s and %s' % \
(cal.busdaycount(date1, date2), date1, date2)
License
MIT
History
0.1.0 (2014-06-22)
Initial release.
0.2.0 (2015-12-27)
Fixed bug in work day calculation when end date was not a work day.
0.2.1 (2015-12-27)
Fixed distribution issues.
Metadata
Release files for business_calendar 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| business_calendar-0.2.1.zip | 15.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| business_calendar-0.2.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 27.4 kB
Release files / business_calendar-0.2.1.zip
| Download URL | business_calendar-0.2.1.zip |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed434c389c277438592df7285fde5882d3c26c6d9658a9cd3c35adee4d136d6d
|
|
BLAKE2b-256 checksum How to use checksums |
c63e1f169d876cf8b041607934c8915057c86bdc3e80b499fd79118d9cef005b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / business_calendar-0.2.1-py2.py3-none-any.whl
| Download URL | business_calendar-0.2.1-py2.py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
2f91a0a41c8b7bd641afa33befc6e8d5e871beb16c827bc2d508f1025e78c635
|
|
BLAKE2b-256 checksum How to use checksums |
bc72c4a6df785b7684190756fc58e97cfb3baf298670ff421f4dadde74d50f8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for business_calendar 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.