Skip to main content

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

crashbytes_dateutils-1.1.5.tar.gz (40.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crashbytes_dateutils-1.1.5-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file crashbytes_dateutils-1.1.5.tar.gz.

File metadata

  • Download URL: crashbytes_dateutils-1.1.5.tar.gz
  • Upload date:
  • Size: 40.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for crashbytes_dateutils-1.1.5.tar.gz
Algorithm Hash digest
SHA256 dbb758692ad7c9fbdcc89482fcce6a794aa8eb89a2907ce24ecc66583da10a8a
MD5 5f2e54c20ee7a534f62fef46f94d6c07
BLAKE2b-256 de76bd956f982d2461e28fd0426bc87393c25b7708ebc514d790128c4501a2ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for crashbytes_dateutils-1.1.5.tar.gz:

Publisher: publish.yml on CrashBytes/crashbytes-dateutils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file crashbytes_dateutils-1.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for crashbytes_dateutils-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b054b37968a132ad73d0fdab5db06a43725fdd66fcc11a5a798828d7d160ff31
MD5 0fa28acf543725db4d5e63aabfa44e35
BLAKE2b-256 9e694e79afe093c6111f4a4b72c6c3c6a4c17468b0b1024eae4f0d952c3a8d6d

See more details on using hashes here.

Provenance

The following attestation bundles were made for crashbytes_dateutils-1.1.5-py3-none-any.whl:

Publisher: publish.yml on CrashBytes/crashbytes-dateutils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page