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

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

twix/carbon
===========

This is a wrapper for briannesbitt/carbon which also calculates which days are French bank holidays.

1.0.0(5y ago)041MITPHPPHP ^7.1CI failing

Since Jun 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ValentinMerlet/carbon)[ Packagist](https://packagist.org/packages/twix/carbon)[ RSS](/packages/twix-carbon/feed)WikiDiscussions master Synced 4d ago

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

[![Build Status](https://camo.githubusercontent.com/8b86f6802f6b6b59923c91e71a774f01f2d50fa1811a2f18ce3f8c0f0468488d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f56616c656e74696e4d65726c65742f636172626f6e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.com/github/ValentinMerlet/carbon)[![codecov.io](https://camo.githubusercontent.com/12ef6d7d723ee760eead7987789e6350a7c44666655b050baf39a356f8eafd76/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f67682f56616c656e74696e4d65726c65742f636172626f6e3f7374796c653d666c61742d737175617265)](https://codecov.io/gh/ValentinMerlet/carbon)

Carbon Support for FR Bank Holidays
===================================

[](#carbon-support-for-fr-bank-holidays)

This extends [Carbon](https://github.com/briannesbitt/Carbon) and calculates which days are French bank holidays.

Note: For now, it only supports Carbon v2

*Read this in other languages: [Français](README.fr.md)*

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

[](#installation)

```
composer require twix/carbon

```

Examples
--------

[](#examples)

```
// Checks if the given date is bank holiday
Carbon::isBankHoliday('2020-05-21'); // true
Carbon::isBankHoliday(Carbon::parse('First day of 2000')); // true

Carbon::getEasterMonday(2021); // '2021-04-05'
Carbon::getWhitMonday(2021); // '2021-05-24'

// Without any parameter will return date for the current year
Carbon::getAscensionThursday(); // '2020-05-21'

// Get all bank holidays for one year
array_map(function (Carbon $carbon): string {
    return $carbon->format('Y-m-d');
}, Carbon::getAllBankHolidaysForOneYear(2021));
/*
[
    '2021-01-01',
    '2021-04-05',
    '2021-05-01',
    '2021-05-08',
    '2021-05-13',
    '2021-05-24',
    '2021-07-14',
    '2021-08-15',
    '2021-11-01',
    '2021-11-11',
    '2021-12-25'
]
*/
```

Contributing
------------

[](#contributing)

1. Clone the repo and install dependencies.

```
docker-compose run --rm php /usr/local/bin/composer install

```

2. Run Tests

```
docker-compose run --rm php vendor/bin/phpunit

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

2154d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2cfa63577668aeaed3339bc03401c92f9a92aebce731880ea41e774ebfdc32e5?d=identicon)[Twix](/maintainers/Twix)

---

Top Contributors

[![ValentinMerlet](https://avatars.githubusercontent.com/u/2642302?v=4)](https://github.com/ValentinMerlet "ValentinMerlet (22 commits)")

---

Tags

Bankholidayholidaysfrenchjoursfériés

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[azuyalabs/yasumi

The easy PHP Library for calculating holidays

1.1k11.4M26](/packages/azuyalabs-yasumi)[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)[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)[aeon-php/business-hours

Abstraction allowing to define and check against business hours

10135.8k](/packages/aeon-php-business-hours)

PHPackages © 2026

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