--- id: businesstimedelta version: "1.0.1" license: MIT license_treatment: permissive maintenance: abandoned --- # businesstimedelta — Timedelta for business time. Supports exact amounts of time (hours, seconds), custom schedules, holidays, and time zones. License: permissive · Maintenance: abandoned · Downloads: 1.4M/mo ## What it is and what it does BusinessTimeDelta is a Python library that calculates the elapsed time between two datetimes while respecting business hours, not calendar time. It lets you define working schedules (start/end times, working days), exclude lunch breaks and holidays, and perform arithmetic on business time intervals. The package integrates with pytz for timezone handling and the holidays library for holiday exclusion. You define your business rules once—specifying work hours, days of the week, lunch breaks, and holidays—then use those rules to compute the actual working time between any two datetimes or to add/subtract business time from a given moment. This is useful for SLAs, ticket response times, project scheduling, and any domain where elapsed time should count only working hours. Use it for: - Calculate SLA compliance: measure working hours elapsed since a support ticket was opened, excluding nights and weekends. - Project scheduling: add business days and hours to a start date to estimate a realistic delivery deadline. - Multi-timezone overlap: find the working-hour intersection between teams in different time zones. - Payroll and shift tracking: compute hours worked across day and night shifts, accounting for lunch breaks. - Holiday-aware reporting: exclude company holidays and local holidays from time-tracking calculations. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Calculates elapsed working time between two datetimes, accounting for business hours, lunch breaks, holidays, and time zones. No—not recommended for new projects. The package is abandoned (last commit 2022-01-26) and will not receive updates. While it has low install friction and a permissive MIT license, the lack of maintenance means you will inherit any compatibility issues and cannot rely on bug fixes. Consider an actively maintained alternative if business time calculation is critical to your application. ## Install pip install businesstimedelta uv add businesstimedelta poetry add businesstimedelta ## Installing businesstimedelta Before you install: Low install friction with only 2 runtime dependencies (pytz and holidays). However, the package is abandoned—last commit was 2022-01-26—so it will not receive bug fixes or updates. License in practice: MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you include the license notice. Quickstart: import datetime import businesstimedelta workday = businesstimedelta.WorkDayRule( start_time=datetime.time(9), end_time=datetime.time(18), working_days=[0, 1, 2, 3, 4]) businesshrs = businesstimedelta.Rules([workday]) start = datetime.datetime(2016, 1, 18, 9, 0, 0) end = datetime.datetime(2016, 1, 22, 18, 0, 0) bdiff = businesshrs.difference(start, end) print(bdiff.hours) Verify before relying: - Whether the package works reliably with modern Python versions despite being abandoned since 2022 - Active maintenance or community forks that may address compatibility issues ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 1.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags business hours time calculation, working time between dates, business timedelta, exclude weekends holidays from duration, custom work schedule duration, timezone-aware business hours, workday time arithmetic, time-calculation, scheduling, abandoned [View on SkillFed](https://skillfed.io/packages/businesstimedelta) · [View on PyPI](https://pypi.org/project/businesstimedelta/)