business-duration
Calculates business duration in days, hours, minutes and seconds by excluding weekends, public holidays and non-business hours
Decision gist · record as of 2026-08-14
Yes, if you need business-duration calculations and can tolerate high install friction from numpy/pandas dependencies. The package is stable and permissively licensed, but maintenance is aging—last commit in 2020 with infrequent updates. Suitable for production use in SLA tracking or business-time reporting; consider it a mature utility rather than an actively developed project. No known security vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires numpy and pandas, which have compiled dependencies and may require build tools or pre-built wheels for your platform.
- High install friction due to compiled dependencies (numpy, pandas).
- Package maintenance is aging—last commit was 2020-04-02, though a release appeared on 2025-10-12; the repository remains active but infrequently updated.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions, provided you retain the license notice.
last release 2025-10-12 (306 days) · last repo commit 2020-04-02 · 32 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 74,128 downloads/mo, #14,874 on PyPI
Alternatives
Verify before relying
from business_duration import businessDuration
import pandas as pd
from datetime import time
start_date = pd.to_datetime('2017-07-01 02:02:00')
end_date = pd.to_datetime('2017-07-07 04:48:00')
biz_open_time = time(7, 0, 0)
biz_close_time = time(17, 0, 0)
result = businessDuration(startdate=start_date, enddate=end_date,
starttime=biz_open_time, endtime=biz_close_time,
unit='hour')- Whether the package works with modern Python versions (requires_python is unspecified in metadata).
- Whether the 2025-10-12 release represents active maintenance or a one-off update after years of inactivity.
What it is and what it does
Business-Duration is a utility for calculating elapsed time between two dates while respecting business calendars. It excludes weekends, public holidays, and hours outside a defined business window (e.g., 9 AM to 5 PM), returning the result in your choice of unit: days, hours, minutes, or seconds. The package accepts start and end dates as Python datetime objects, optional custom holiday lists, and a weekend definition, making it useful for SLA tracking, ticket resolution times, or any scenario where you need to measure only active business time.
The package depends on numpy and pandas for its core operations. It integrates with the holidays library to handle public holiday calendars and works with both single date pairs and vectorized operations over pandas DataFrames. The implementation is straightforward: you pass datetime objects, business hours, holidays, and a unit, and receive a numeric result representing business duration in that unit.
Use it for
- Calculate SLA response or resolution times for support tickets, excluding nights and weekends.
- Measure project task duration in business days for resource planning and reporting.
- Batch-process a DataFrame of ticket timestamps to compute business hours elapsed per row.
- Generate business-day-aware time metrics for compliance or audit reporting.
- Build custom business calendars with state-specific or company-specific holidays.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need business-duration calculations and can tolerate high install friction from numpy/pandas dependencies.
The package is stable and permissively licensed, but maintenance is aging—last commit in 2020 with infrequent updates. Suitable for production use in SLA tracking or business-time reporting; consider it a mature utility rather than an actively developed project. No known security vulnerabilities.
Install
business-duration on PyPI
Before you install
High install friction due to compiled dependencies (numpy, pandas). Package maintenance is aging—last commit was 2020-04-02, though a release appeared on 2025-10-12; the repository remains active but infrequently updated.
Requires numpy and pandas, which have compiled dependencies and may require build tools or pre-built wheels for your platform.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions, provided you retain the license notice.
Quickstart
from business_duration import businessDuration
import pandas as pd
from datetime import time
start_date = pd.to_datetime('2017-07-01 02:02:00')
end_date = pd.to_datetime('2017-07-07 04:48:00')
biz_open_time = time(7, 0, 0)
biz_close_time = time(17, 0, 0)
result = businessDuration(startdate=start_date, enddate=end_date,
starttime=biz_open_time, endtime=biz_close_time,
unit='hour')
Verify before relying
- Whether the package works with modern Python versions (requires_python is unspecified in metadata).
- Whether the 2025-10-12 release represents active maintenance or a one-off update after years of inactivity.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | 2 packagesnumpypandas |
| Maintenance | Aging 306 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 74,128 / month, #14,874 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: business_duration-0.68.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “business hours duration calculator”
- business-durationCalculates business duration between two dates by excluding weekends,…
- businesstimedeltaCalculates elapsed working time between two datetimes, accounting for…
- python-timeoutGenerates random timeouts between specified minimum and maximum…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also businesstimedelta · workalendar · dateutils · govuk-bank-holidays · suntimes · delta · fiscalyear · pytimeparse · convertdate