PHPackages                             maximnara/business-days-counter - 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. maximnara/business-days-counter

ActiveLibrary

maximnara/business-days-counter
===============================

Counts business days difference.

1.0.0(6y ago)22MITPHPPHP &gt;=7.0

Since Jul 23Pushed 6y agoCompare

[ Source](https://github.com/maximnara/business-days-counter)[ Packagist](https://packagist.org/packages/maximnara/business-days-counter)[ RSS](/packages/maximnara-business-days-counter/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

Business Days Counter
=====================

[](#business-days-counter)

[![Build Status](https://camo.githubusercontent.com/0907e1bfec9dd9d3c7cf01fd86c204ed05f372fcbaa77439f1b86f953d0eddfc/68747470733a2f2f6170692e7472617669732d63692e6f72672f6d6178696d6e6172612f627573696e6573732d646179732d636f756e7465722e737667)](https://travis-ci.org/maximnara/business-days-counter)[![Latest Stable Version](https://camo.githubusercontent.com/14fac07af847234d3bdcf22f869f19234aa53bacf372cffc0945d26f159ef998/68747470733a2f2f706f7365722e707567782e6f72672f6d6178696d6e6172612f627573696e6573732d646179732d636f756e7465722f762f737461626c65)](https://packagist.org/packages/maximnara/business-days-counter)[![Total Downloads](https://camo.githubusercontent.com/40e3d14f66b4b50fe1291e3f9c81162e35e880e4ae446c61c6b896d82bdf9df6/68747470733a2f2f706f7365722e707567782e6f72672f6d6178696d6e6172612f627573696e6573732d646179732d636f756e7465722f646f776e6c6f616473)](https://packagist.org/packages/maximnara/business-days-counter)

Returns difference between dates without public holidays and weekends. Works for different countries.

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

[](#installation)

Add library in Composer

```
composer require maximnara/business-days-counter

```

Development
-----------

[](#development)

If you are developing this module you can connect this library locally.

1. Add psr-4 config to composer.json

```
"require": {
    ...,
    "maximnara/business-days-counter": "*"
},
"repositories": [
    ...,
    {
        "type": "path",
        "url": "../business-days-counter"
    }
]

```

2. Add provider to `config/app.php` into `providers` array:

```
"providers" => array(
    ...,
    ShowHeroes\LaravelQueueMonitoring\LaravelQueueMonitoringServiceProvider::class,
)

```

Config
------

[](#config)

In your config/services.php set this

```
'business-days-counter' => [
    'country' => 'lv',
    'working-hours' => [
        'from' => 9,
        'to' => 18,
        'launch-hour' => 14, // This is launch hour start and it goes till 15
    ],
],

```

How to use
----------

[](#how-to-use)

```
use maximnara\BusinessDaysCounter\DatesCounter;

public function __construct(DatesCounter $datesCounter)
{
    $this->datesCounter = $datesCounter;
}

public function action()
{
    $diffInSeconds = $this->datesCounter->getDifferenceInSeconds($date1, $date2, DateCounter::COUNTRY_FR); // Here only Carbon dates.
}

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2485d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6029e561d1f3a2bda9b7d83166c281b3db11627df7b06a5064ef86c32658c5d0?d=identicon)[maximnara](/maintainers/maximnara)

---

Top Contributors

[![maximnara](https://avatars.githubusercontent.com/u/2614172?v=4)](https://github.com/maximnara "maximnara (1 commits)")

---

Tags

businessbusiness-dayscarboncountercountrydatesdiffdifferenceholidayslaravellaravel-frameworkpublic-holidaysweekendlaravelholidaysdifferencemaximnara

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/maximnara-business-days-counter/health.svg)

```
[![Health](https://phpackages.com/badges/maximnara-business-days-counter/health.svg)](https://phpackages.com/packages/maximnara-business-days-counter)
```

###  Alternatives

[laravel/octane

Supercharge your Laravel application's performance.

4.0k21.5M159](/packages/laravel-octane)[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel/nightwatch

The official Laravel Nightwatch package.

3486.1M13](/packages/laravel-nightwatch)[omniphx/forrest

A Laravel library for Salesforce

2724.4M8](/packages/omniphx-forrest)

PHPackages © 2026

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