Zero-dependency datetime business helpers — business days, fiscal quarters, relative strings.
Project description
crashbytes-dateutils
Zero-dependency datetime business helpers — business days, fiscal quarters, relative strings.
Install
pip install crashbytes-dateutils
Usage
from datetime import date
from crashbytes_dateutils import (
add_business_days, business_days_between, to_relative_string,
fiscal_quarter, age, start_of_month, end_of_month,
)
add_business_days(date(2024, 6, 14), 1) # date(2024, 6, 17) — skips weekend
business_days_between(date(2024, 6, 17), date(2024, 6, 21)) # 4
to_relative_string(date(2024, 6, 12), today=date(2024, 6, 15)) # "3 days ago"
fiscal_quarter(date(2024, 7, 15), start_month=7) # 1
age(date(1990, 6, 15), today=date(2024, 6, 15)) # 34
License
MIT
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crashbytes_dateutils-1.1.2.tar.gz.
File metadata
- Download URL: crashbytes_dateutils-1.1.2.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d814622cb793ee63d89ac2d203ab930cdb35e77b9c8b2e15aa80cf1a20d8d773
|
|
| MD5 |
281f41a3ebae06a90595dc290a140741
|
|
| BLAKE2b-256 |
95922bf5f0f2db52f8bdcd2fb76375a9e5e5c4c96c79362f918f3bd01992dcc2
|
Provenance
The following attestation bundles were made for crashbytes_dateutils-1.1.2.tar.gz:
Publisher:
publish.yml on CrashBytes/crashbytes-dateutils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crashbytes_dateutils-1.1.2.tar.gz -
Subject digest:
d814622cb793ee63d89ac2d203ab930cdb35e77b9c8b2e15aa80cf1a20d8d773 - Sigstore transparency entry: 1774044868
- Sigstore integration time:
-
Permalink:
CrashBytes/crashbytes-dateutils@fc9e2c686aada664eb78298e47d3ee5a9f2fd9ca -
Branch / Tag:
refs/tags/v1.1.2 - Owner: https://github.com/CrashBytes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fc9e2c686aada664eb78298e47d3ee5a9f2fd9ca -
Trigger Event:
push
-
Statement type:
File details
Details for the file crashbytes_dateutils-1.1.2-py3-none-any.whl.
File metadata
- Download URL: crashbytes_dateutils-1.1.2-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb2b33f4231ee03c086fb49e5ef35309bcfd9f7ab5ba52dc859312ad8a462685
|
|
| MD5 |
7de6d79ae36794aafbd6dcb46711b856
|
|
| BLAKE2b-256 |
0523fda67c0d2d32dc4eee398a43baa07312ecf2c6a9d271fbcd9fc334cbc700
|
Provenance
The following attestation bundles were made for crashbytes_dateutils-1.1.2-py3-none-any.whl:
Publisher:
publish.yml on CrashBytes/crashbytes-dateutils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crashbytes_dateutils-1.1.2-py3-none-any.whl -
Subject digest:
cb2b33f4231ee03c086fb49e5ef35309bcfd9f7ab5ba52dc859312ad8a462685 - Sigstore transparency entry: 1774044970
- Sigstore integration time:
-
Permalink:
CrashBytes/crashbytes-dateutils@fc9e2c686aada664eb78298e47d3ee5a9f2fd9ca -
Branch / Tag:
refs/tags/v1.1.2 - Owner: https://github.com/CrashBytes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fc9e2c686aada664eb78298e47d3ee5a9f2fd9ca -
Trigger Event:
push
-
Statement type: