PHPackages                             minasm/carbon-uk - 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. minasm/carbon-uk

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

minasm/carbon-uk
================

A basic wrapper for citco/carbon which returns business days between two given dates.

1.0.1(1y ago)0322↓50%MITPHPPHP ^8.3

Since Mar 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/minasm/carbon)[ Packagist](https://packagist.org/packages/minasm/carbon-uk)[ RSS](/packages/minasm-carbon-uk/feed)WikiDiscussions main Synced 1mo ago

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

Minasm/Carbon
=============

[](#minasmcarbon)

Minasm/Carbon is a package that extends the functionality of the [citco/carbon](https://github.com/citco/carbon) package, which provides a wrapper for the [Carbon](https://github.com/briannesbitt/Carbon) date/time library with support for UK bank holidays.

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

[](#installation)

To install Minasm/Carbon, simply require it using [Composer](https://getcomposer.org/):

```
composer require minasm/carbon-uk

```

Usage
-----

[](#usage)

Minasm/Carbon provides a single method: `getBusinessDays()`. This method calculates the number of business days between two dates, excluding weekends and UK bank holidays. Here's how you can use it:

```
use Minasm\Carbon;

$startDate = '01/03/2023';
$endDate = '31/03/2023';

$businessDays = (new Carbon())->getBusinessDays($startDate, $endDate);

echo "There are {$businessDays} business days between {$startDate} and {$endDate}";

```

The output of the above code will be:

```
There are 23 business days between 01/03/2023 and 31/03/2023.

```

The `getBusinessDays()` method takes three parameters:

- `$start` (string): the start date, in the format specified by the `$format` parameter (default is `'d/m/Y'`).
- `$end` (string): the end date, in the format specified by the `$format` parameter (default is `'d/m/Y'`).
- `$format` (string, optional): the format of the `$start` and `$end` parameters (default is `'d/m/Y'`).

Issues
------

[](#issues)

If you encounter any bugs or have any feature requests, please submit them to the [GitHub issue tracker](https://github.com/minasm/carbon/issues).

License
-------

[](#license)

Minasm/Carbon is open source software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

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

Total

2

Last Release

586d ago

PHP version history (2 changes)1.0.0PHP ^7.2 || ^8.0

1.0.1PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/01f0b53d2f1f697cab1b530538889eccbd880320c4d4bb9c3fe7008339d0a583?d=identicon)[minasm](/maintainers/minasm)

---

Top Contributors

[![minasm](https://avatars.githubusercontent.com/u/2103447?v=4)](https://github.com/minasm "minasm (10 commits)")

---

Tags

Bankholidayholidaysbritishenglandwalesbusiness days

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/minasm-carbon-uk/health.svg)

```
[![Health](https://phpackages.com/badges/minasm-carbon-uk/health.svg)](https://phpackages.com/packages/minasm-carbon-uk)
```

###  Alternatives

[citco/carbon

This is a wrapper for nesbot/carbon which also calculates which days are British bank holidays (England &amp; Wales only).

17400.1k5](/packages/citco-carbon)[azuyalabs/yasumi

The easy PHP Library for calculating holidays

1.1k11.4M26](/packages/azuyalabs-yasumi)[geoffreyrose/us-holidays

US Holidays Wrapper for the Carbon DateTime Library.

62717.0k2](/packages/geoffreyrose-us-holidays)[spatie/holidays

Calculate public holidays

392604.1k1](/packages/spatie-holidays)[holidayapi/holidayapi-php

Official PHP library for Holiday API

35213.3k1](/packages/holidayapi-holidayapi-php)[zhuzhichao/bank-card-info

Get the bank card info

45464.8k](/packages/zhuzhichao-bank-card-info)

PHPackages © 2026

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