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

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

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 3d 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

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

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

2534d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2614172?v=4)[Max Luzhkov](/maintainers/maximnara)[@maximnara](https://github.com/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.0k24.7M207](/packages/laravel-octane)[statamic/cms

The Statamic CMS Core Package

4.8k3.5M925](/packages/statamic-cms)[spatie/laravel-analytics

A Laravel package to retrieve Google Analytics data.

3.2k6.0M66](/packages/spatie-laravel-analytics)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17818.7k](/packages/markwalet-nova-modal-response)

PHPackages © 2026

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