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

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

swydmuch/business-days
======================

PHP library to work with single day and range of days in order to check business days

v1.0.2(1y ago)05MITPHPPHP &gt;=8.0

Since Dec 30Pushed 1y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

Business Days
=============

[](#business-days)

PHP library to work with single day and range of days in order to check business days

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

[](#installation)

```
composer require swydmuch/business-days
```

Localization
------------

[](#localization)

At the moment, the library operates only on the public holidays in **Poland** (pl) and **Netherlands** (nl)
I encourage you to contribute in order to add other locations

Basic Usage
-----------

[](#basic-usage)

### Creating Day from string

[](#creating-day-from-string)

```
$day = Day::createFromString('2021-12-13', 'pl');
```

### Checking if day is business

[](#checking-if-day-is-business)

```
$day->isBusiness();
//true
```

### Creating range between two days

[](#creating-range-between-two-days)

```
$range = Range::createFromString('2021-12-13', '2021-12-14', 'pl');
```

### Counting business days in range

[](#counting-business-days-in-range)

```
$range->countBusinessDays();
//2
```

### Getting array of business days from range

[](#getting-array-of-business-days-from-range)

```
$range->businessDays();
//[Day,Day]
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance46

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

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 ~596 days

Total

3

Last Release

402d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ed6bf634dd334b7c9d369d3d2387fe42fc59bfdaf267d8ae0f1700be594233a?d=identicon)[swydmuch](/maintainers/swydmuch)

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[aucor/dynamic-mo-loader

Better text domain loading with object cache support for WordPress

4554.1k1](/packages/aucor-dynamic-mo-loader)

PHPackages © 2026

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