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

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

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

A PHP library to calculate business hours between two dates.

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

Since May 22Pushed 8y 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 2w 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 57% 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

3005d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2140824?v=4)[José Raupp da Rosa Junior](/maintainers/Raupp)[@raupp](https://github.com/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

[illuminate/support

The Illuminate Support package.

583115.4M44.9k](/packages/illuminate-support)[jean85/pretty-package-versions

A library to get pretty versions strings of installed dependencies

1.3k325.7M89](/packages/jean85-pretty-package-versions)[composer/satis

Simple Repository Generator

3.3k1.5M19](/packages/composer-satis)[spatie/holidays

Calculate public holidays

402955.7k2](/packages/spatie-holidays)[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

292960.7k37](/packages/craftcms-feed-me)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54686.7k25](/packages/solspace-craft-freeform)

PHPackages © 2026

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