PHPackages                             raupp/business-hours-diff - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. raupp/business-hours-diff

ActiveLibrary

raupp/business-hours-diff
=========================

A PHP library to calculate business hours between two dates.

1.0.3(7y ago)1645MITPHPPHP &gt;=7.1.3

Since May 22Pushed 7y agoCompare

[ Source](https://github.com/RauppRafael/BusinessHoursDiff)[ Packagist](https://packagist.org/packages/raupp/business-hours-diff)[ RSS](/packages/raupp-business-hours-diff/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (1)Versions (6)Used By (0)

Business Hours Diff
===================

[](#business-hours-diff)

A PHP library to calculate business hours between two dates

Installation
------------

[](#installation)

`composer require raupp/business-hours-diff`

Usage
-----

[](#usage)

```
$businessOpensAt = 9;
$businessClosesAt = 19;

$date1 = Carbon::parse('2018-04-01 08:02');
$date2 = Carbon::parse('2018-04-01 22:39');

$minutes = (new BusinessHoursDiff())
                ->businessOpensAt(9)
                ->businessClosesAt(19)
                ->diff($date1, $date2);

echo $minutes;      // 600

```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

2913d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4bd200733741f63e5adfa3a4ebb8239ac4dd2ad97247eebd4c941de012d5c855?d=identicon)[Raupp](/maintainers/Raupp)

---

Top Contributors

[![RauppRafael](https://avatars.githubusercontent.com/u/14304799?v=4)](https://github.com/RauppRafael "RauppRafael (21 commits)")

---

Tags

composerpackagetimebusiness hourstime diff

### Embed Badge

![Health badge](/badges/raupp-business-hours-diff/health.svg)

```
[![Health](https://phpackages.com/badges/raupp-business-hours-diff/health.svg)](https://phpackages.com/packages/raupp-business-hours-diff)
```

###  Alternatives

[jean85/pretty-package-versions

A library to get pretty versions strings of installed dependencies

1.3k289.5M63](/packages/jean85-pretty-package-versions)[composer/satis

Simple Repository Generator

3.3k1.4M17](/packages/composer-satis)[codedungeon/phpunit-result-printer

PHPUnit Pretty Result Printer

1.2k8.8M397](/packages/codedungeon-phpunit-result-printer)[fxp/composer-asset-plugin

NPM/Bower Dependency Manager for Composer

8894.8M41](/packages/fxp-composer-asset-plugin)[codedungeon/php-cli-colors

Liven up you PHP Console Apps with standard colors

10210.1M26](/packages/codedungeon-php-cli-colors)[consolidation/cgr

Safer alternative to 'composer global require'.

453213.9k](/packages/consolidation-cgr)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
