PHPackages                             spaanproductions/laravel-carbon-holidays - 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. spaanproductions/laravel-carbon-holidays

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

spaanproductions/laravel-carbon-holidays
========================================

Add Dutch Holidays Check to Carbon in Laravel

3.0.6(3mo ago)39.9k↓47.7%1MITPHPPHP ^8.0|^8.1|^8.2|^8.3|^8.4|^8.5CI passing

Since May 18Pushed 3mo ago2 watchersCompare

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

READMEChangelog (10)Dependencies (4)Versions (14)Used By (0)

Carbon isHoliday() function to check if the current date is a Holiday
=====================================================================

[](#carbon-isholiday-function-to-check-if-the-current-date-is-a-holiday)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2f30df0f934df486b90bfa47b8feed43aa736e91fc130f2737bda6d385c3090b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737061616e70726f64756374696f6e732f6c61726176656c2d636172626f6e2d686f6c69646179732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spaanproductions/laravel-carbon-holidays)[![Total Downloads](https://camo.githubusercontent.com/bdad19205f92cbd4470378c6bfd381d8f52b50dd5686d4d33ad7845f69e136ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f737061616e70726f64756374696f6e732f6c61726176656c2d636172626f6e2d686f6c69646179732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spaanproductions/laravel-carbon-holidays)[![GitHub Actions](https://github.com/spaanproductions/laravel-carbon-holidays/actions/workflows/main.yml/badge.svg)](https://github.com/spaanproductions/laravel-carbon-holidays/actions/workflows/main.yml/badge.svg)

This package can be used to add the isHoliday() function to [Carbon](https://github.com/briannesbitt/carbon). This only checks the **Dutch** holidays at the moment. We will only check if it's a holiday, not if it's a mandatory free day.

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

[](#installation)

You can install the package via composer:

```
composer require spaanproductions/laravel-carbon-holidays
```

It will auto discover in Laravel.

Usage
-----

[](#usage)

### Check if any holiday

[](#check-if-any-holiday)

```
use Carbon\Carbon;

$date = Carbon::parse('2021-12-25');
$date->isHoliday(); // true

$date = Carbon::parse('2021-06-15');
$date->isHoliday(); // false
```

### Check specific holidays

[](#check-specific-holidays)

You can check for individual holidays using either English or Dutch method names:

```
// English method names
$date = Carbon::parse('2021-12-25');
$date->isChristmasDay(); // true

$date = Carbon::parse('2021-04-27');
$date->isKingsDay(); // true

$date = Carbon::parse('2021-01-01');
$date->isNewYear(); // true

// Dutch method names
$date = Carbon::parse('2021-12-25');
$date->isEersteKerstdag(); // true

$date = Carbon::parse('2021-04-27');
$date->isKoningsdag(); // true

$date = Carbon::parse('2021-01-01');
$date->isNieuwjaarsdag(); // true
```

### Available Methods

[](#available-methods)

All methods work with both `Carbon` and `CarbonImmutable` instances.

Holiday (English)Holiday (Dutch)English MethodDutch MethodDateNew Year's DayNieuwjaarsdag`isNewYear()``isNieuwjaarsdag()`January 1Good FridayGoede Vrijdag`isGoodFriday()``isGoedeVrijdag()`Friday before EasterEaster SundayPaaszondag`isEasterSunday()``isPaaszondag()`CalculatedEaster MondayPaasmaandag`isEasterMonday()``isPaasmaandag()`Monday after EasterKing's DayKoningsdag`isKingsDay()``isKoningsdag()`April 27\*Liberation DayBevrijdingsdag`isLiberationDay()``isBevrijdingsdag()`May 5Ascension DayHemelvaart`isAscensionDay()``isHemelvaart()`†Thursday, Easter + 39 daysPentecostPinksterzondag`isPentecost()`‡`isPinksterzondag()`Sunday, Easter + 49 daysPentecost MondayPinkstermaandag`isPentecostMonday()`‡`isPinkstermaandag()`Monday, Easter + 50 daysChristmas DayEerste Kerstdag`isChristmasDay()``isEersteKerstdag()`December 25Boxing DayTweede Kerstdag`isBoxingDay()``isTweedeKerstdag()`December 26\* King's Day is April 26 when April 27 falls on a Sunday † Also available as `isHemelvaartsdag()`‡ Aliases available: `isWhitsunday()` and `isWhitMonday()`

### Practical Examples

[](#practical-examples)

#### King's Day / Koningsdag

[](#kings-day--koningsdag)

```
// Normal King's Day (April 27)
Carbon::parse('2021-04-27')->isKingsDay(); // true

// When April 27 is Sunday, celebrated on April 26
Carbon::parse('2025-04-26')->isKoningsdag(); // true
Carbon::parse('2025-04-27')->isKoningsdag(); // false
```

#### Easter-related holidays

[](#easter-related-holidays)

```
// Easter Sunday 2021
Carbon::parse('2021-04-04')->isEasterSunday(); // true
Carbon::parse('2021-04-04')->isPaaszondag(); // true

// Good Friday (the Friday before Easter)
Carbon::parse('2021-04-02')->isGoodFriday(); // true
Carbon::parse('2021-04-02')->isGoedeVrijdag(); // true

// Ascension Day (Thursday, 39 days after Easter)
Carbon::parse('2021-05-13')->isAscensionDay(); // true
Carbon::parse('2021-05-13')->isHemelvaart(); // true

// Pentecost (Sunday, 49 days after Easter)
Carbon::parse('2021-05-23')->isPentecost(); // true
Carbon::parse('2021-05-23')->isWhitsunday(); // true (alias)
Carbon::parse('2021-05-23')->isPinksterzondag(); // true (Dutch)
```

#### Working with CarbonImmutable

[](#working-with-carbonimmutable)

```
use Carbon\CarbonImmutable;

$date = CarbonImmutable::parse('2021-12-25');
$date->isChristmasDay(); // true
$date->isEersteKerstdag(); // true
```

Configuration
-------------

[](#configuration)

### Publishing the Config

[](#publishing-the-config)

You can publish the configuration file to customize which holidays are recognized:

```
php artisan vendor:publish --tag="laravel-carbon-holidays"
```

This creates `config/holidays.php` in your application.

### Configuration Options

[](#configuration-options)

Each holiday can be enabled (`true`) or disabled (`false`):

```
return [
    'new_year' => true,
    'good_friday' => true,
    'easter_sunday' => true,
    'easter_monday' => true,
    'kings_day' => true,
    'liberation_day' => true,
    'ascension_day' => true,
    'pentecost' => true,
    'pentecost_monday' => true,
    'christmas_day' => true,
    'boxing_day' => true,
];
```

### Liberation Day Special Options

[](#liberation-day-special-options)

Liberation Day supports three configuration modes:

```
// Always a holiday (default)
'liberation_day' => true,

// Never a holiday
'liberation_day' => false,

// Only a holiday once every 5 years (2020, 2025, 2030, etc.)
'liberation_day' => 'once-every-5-years',
```

Historically, Liberation Day in the Netherlands was only a public holiday once every 5 years. The `'once-every-5-years'` option implements this by checking if the year is divisible by 5.

### Important Notes

[](#important-notes)

- **Configuration only affects `isHoliday()`** - The general `isHoliday()` method respects your configuration
- **Individual methods always work** - Methods like `isNewYear()`, `isChristmasDay()`, etc. check the actual date regardless of configuration
- **Example:**

```
// With 'good_friday' => false in config
$date = Carbon::parse('2021-04-02');

$date->isHoliday();     // false (respects config - Good Friday disabled)
$date->isGoodFriday();  // true (checks the actual date - it IS Good Friday)
```

This allows you to:

- Control which holidays `isHoliday()` recognizes for your application
- Still use individual methods to check if a date matches a specific holiday

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Spaan Productions](https://github.com/spaanproductions)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance82

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 87.5% 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 ~157 days

Total

12

Last Release

92d ago

Major Versions

1.0.1 → 2.0.02022-02-14

2.0.1 → 3.0.02023-06-27

2.0.2 → 3.0.62026-02-15

PHP version history (6 changes)1.0.0PHP ^7.3|^7.4|^8.0

2.0.0PHP ^8.0|^8.1

3.0.1PHP ^8.0|^8.1|^8.2

3.0.2PHP ^8.0|^8.1|^8.2|^8.3

3.0.4PHP ^8.0|^8.1|^8.2|^8.3|^8.4

3.0.6PHP ^8.0|^8.1|^8.2|^8.3|^8.4|^8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/995231520c67f8525b9eb01fbd1ebc9db2405942d40fc1373276cd976da81b9e?d=identicon)[spaantje](/maintainers/spaantje)

---

Top Contributors

[![spaantje](https://avatars.githubusercontent.com/u/477362?v=4)](https://github.com/spaantje "spaantje (7 commits)")[![LeSqueed](https://avatars.githubusercontent.com/u/7735143?v=4)](https://github.com/LeSqueed "LeSqueed (1 commits)")

---

Tags

spaanproductionslaravel-carbon-holidays

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/spaanproductions-laravel-carbon-holidays/health.svg)

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

###  Alternatives

[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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