PHPackages                             rafael-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. rafael-raupp/business-hours-diff

Abandoned → [raupp/business-hours-diff](/?search=raupp%2Fbusiness-hours-diff)Library[Utility &amp; Helpers](/categories/utility)

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

A PHP library to calculate business hours between two dates.

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

Since May 22Pushed 7y agoCompare

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

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

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

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

2910d 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/rafael-raupp-business-hours-diff/health.svg)

```
[![Health](https://phpackages.com/badges/rafael-raupp-business-hours-diff/health.svg)](https://phpackages.com/packages/rafael-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)[fxp/composer-asset-plugin

NPM/Bower Dependency Manager for Composer

8894.8M41](/packages/fxp-composer-asset-plugin)[foxy/foxy

Fast, reliable, and secure NPM/Yarn/pnpm bridge for Composer

177287.5k25](/packages/foxy-foxy)[netojose/laravel-bootstrap-4-forms

Bootstrap 4 form builder for Laravel 5

182115.3k](/packages/netojose-laravel-bootstrap-4-forms)[cpx/cpx

Run any command from any composer package, even if it's not installed in your project.

40410.9k1](/packages/cpx-cpx)

PHPackages © 2026

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