business-days
This is a handful of functions that make working with business days easier. In this context, "business days" are Monday thru Friday, excluding certain bank holidays.
Install
pip install business-days
Usage
import business_days
# Simple day manipulation.
two_business_days_ago = business_days.days_to_now(timezone.now(), 2)
# More complex business hour calculations.
# Mon 07:00 -> Mon 18:30 (expected: 8 business hours)
assertEqual(8 * 3600, business_days.business_timediff(
datetime(2016, 10, 17, 7),
datetime(2016, 10, 17, 18, 30),
).total_seconds())
See the tests for more examples.
Note about developing this: If you are going to release a new version, don't forget to tag the release as v0.x.y (or whatever) so that it's easy to refer to specific versions from requirements.txt files.
Metadata
Release files for business-days 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| business_days-0.0.8.tar.gz | 8.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| business_days-0.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.5 kB
Release files / business_days-0.0.8.tar.gz
| Download URL | business_days-0.0.8.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c915e090db051390a0d444021bd2ecb38cd5ee7c090c88f1bb807670f7e25a7e
|
|
BLAKE2b-256 checksum How to use checksums |
cd29e3444d0a3bc3fa4f9ac0acfc29e716c6a40b56c13fc81796b25867d6399a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 8, 2026.
Transparency logRelease files / business_days-0.0.8-py3-none-any.whl
| Download URL | business_days-0.0.8-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d231c09b85a258be9851cdd3ba52530d1e86cf48818e358074ee1abf0698b0d3
|
|
BLAKE2b-256 checksum How to use checksums |
592bbfa61d94240591ff51687aa04ea6aa1fd09fa34b3134f62b0a3cf35bf635
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 8, 2026.
Transparency log