PHPackages                             luedtke/laravel-holiday-facade - 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. luedtke/laravel-holiday-facade

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

luedtke/laravel-holiday-facade
==============================

Public holiday lookups for Laravel with multi-country driver support, Bundesland filtering, observance/strict mode and translation in five languages.

1.0.1(1mo ago)03MITPHPPHP ^8.2

Since May 31Pushed 1mo agoCompare

[ Source](https://github.com/AlexHL02/laravel-holiday-facade)[ Packagist](https://packagist.org/packages/luedtke/laravel-holiday-facade)[ RSS](/packages/luedtke-laravel-holiday-facade/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

Laravel Holiday Facade
======================

[](#laravel-holiday-facade)

A Laravel package for working with public holidays across multiple countries. Provides a clean facade API with multi-language support, region/state filtering, strict mode, and fully customisable holidays via config.

---

Requirements
------------

[](#requirements)

- PHP **^8.2**
- Laravel **^13.0**

---

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

[](#installation)

```
composer require luedtke/laravel-holiday-facade
```

The service provider is auto-discovered. Publish the config file:

```
php artisan vendor:publish --tag=holiday-config
```

Optionally publish the translation files if you want to customise holiday names:

```
php artisan vendor:publish --tag=holiday-lang
```

---

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

[](#configuration)

```
// config/holiday.php

return [
    'default'        => 'germany',          // active driver
    'default_locale' => env('HOLIDAY_LOCALE', 'en'), // fallback translation locale

    'drivers' => [
        'germany' => [
            'driver'        => 'germany',
            'timezone'      => env('HOLIDAY_TIMEZONE_DE', 'Europe/Berlin'),
            'locale'        => 'de_DE',
            'default_state' => env('HOLIDAY_DEFAULT_STATE_DE', null), // e.g. 'BY'
        ],
        'swedish' => [
            'driver'   => 'swedish',
            'timezone' => env('HOLIDAY_TIMEZONE_SE', 'Europe/Stockholm'),
            'locale'   => 'sv_SE',
        ],
        'finnish' => [
            'driver'   => 'finnish',
            'timezone' => env('HOLIDAY_TIMEZONE_FI', 'Europe/Helsinki'),
            'locale'   => 'fi_FI',
        ],
        'netherlands' => [
            'driver'   => 'netherlands',
            'timezone' => env('HOLIDAY_TIMEZONE_NL', 'Europe/Amsterdam'),
            'locale'   => 'nl_NL',
        ],
    ],

    'custom' => [
        // Repeats every year (MM-DD)
        ['name' => 'Company Day', 'date' => '06-15', 'type' => 'custom'],
        // One-time date
        ['name' => 'Office Closed', 'date' => '2026-12-27', 'type' => 'custom'],
    ],
];
```

---

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

[](#basic-usage)

```
use Laravel\Holiday\Facades\Holiday;

// Is a date a public holiday?
Holiday::isHoliday('2026-12-25');           // true
Holiday::isHoliday('2026-12-24');           // false — Christmas Eve is an observance
Holiday::isHoliday('2026-12-24', strict: false); // true — includes observances

// Is a date a workday?
Holiday::isWorkday('2026-12-25');           // false
Holiday::isWorkday('2026-12-24');           // true — observances are workdays by default

// Next / previous holiday
Holiday::next('2026-12-20')->name;          // "1. Weihnachtstag"
Holiday::previous('2026-01-10')->name;      // "Neujahr"

// Next workday
Holiday::nextWorkday('2026-12-24');         // Carbon instance for 2026-12-28

// Get all holidays for a year
Holiday::getHolidays(2026);                 // Collection of Holiday objects

// Get holidays in a date range
Holiday::getHolidaysBetween('2026-04-01', '2026-04-30');

// Count holidays
Holiday::countHolidays(2026);               // int

// Look up a holiday by date
Holiday::getHoliday('2026-12-25');          // Holiday value object

// Check by name
Holiday::isHolidayByName('Neujahr', 2026);  // true
```

---

Switching Drivers
-----------------

[](#switching-drivers)

Use the `driver()` method to switch country at runtime:

```
Holiday::driver('swedish')->isHoliday('2026-06-19');   // true — Midsommarafton (observance)
Holiday::driver('finnish')->getHolidays(2026);
Holiday::driver('netherlands')->next('2026-04-20')->name; // "Koningsdag"
```

---

Supported Countries
-------------------

[](#supported-countries)

DriverCountryRegional holidays`germany`GermanyYes — 16 Bundesländer`swedish`SwedenNo`finnish`FinlandNo`netherlands`NetherlandsNo---

State / Region Filtering (Germany)
----------------------------------

[](#state--region-filtering-germany)

Germany has regional public holidays that apply only to specific Bundesländer. Pass a state code to filter:

```
// Only holidays that apply to Bavaria (BY)
Holiday::getHolidays(2026, state: 'BY');

// Heilige Drei Könige applies to BY, BW, ST — not to HH
Holiday::isHolidayByName('Heilige Drei Könige', state: 'BY'); // true
Holiday::isHolidayByName('Heilige Drei Könige', state: 'HH'); // false

// Get the list of supported state codes
Holiday::supportedRegions(); // ['BW', 'BY', 'BE', ...]
```

Set a permanent default state via config or `.env` so you never have to pass it explicitly:

```
HOLIDAY_DEFAULT_STATE_DE=BY
```

---

Strict Mode
-----------

[](#strict-mode)

By default, **`HolidayType::Observance`** days (e.g. Christmas Eve, Midsummer Eve, New Year's Eve) are excluded from semantic checks like `isHoliday()` and `next()` because they are not statutory days off.

Pass `strict: false` to include them:

```
Holiday::isHoliday('2026-12-24');                    // false — strict by default
Holiday::isHoliday('2026-12-24', strict: false);     // true

Holiday::next('2026-12-23');                         // 2026-12-25 (skips Christmas Eve)
Holiday::next('2026-12-23', strict: false);          // 2026-12-24 (includes Christmas Eve)

Holiday::countHolidays(2026);                        // excludes observances
Holiday::countHolidays(2026, strict: false);         // includes observances
```

**Default `$strict` per method:**

`true` (excludes observances)`false` (includes observances)`isHoliday`, `isWorkday`, `nextWorkday``getHolidays`, `getHolidaysBetween``next`, `previous`, `countHolidays``getHoliday`, `isHolidayByName`---

Translations
------------

[](#translations)

Every holiday has a stable translation key. Call `translate()` on any `Holiday` value object to get the name in a different language:

```
$holiday = Holiday::next('2026-12-24');

$holiday->name;               // "1. Weihnachtstag" (native — always German for the germany driver)
$holiday->translate('en');    // "Christmas Day"
$holiday->translate('de');    // "1. Weihnachtstag"
$holiday->translate('sv');    // "Juldagen"
$holiday->translate();        // uses app()->getLocale(), falls back to config('holiday.default_locale')
```

**Supported locales:** `de`, `en`, `fi`, `nl`, `sv`

Set the default translation locale in your `.env`:

```
HOLIDAY_LOCALE=en
```

Override individual translation files after publishing:

```
php artisan vendor:publish --tag=holiday-lang
# edit resources/lang/vendor/holiday/en/holidays.php
```

---

Custom Holidays
---------------

[](#custom-holidays)

Add company-specific or one-time holidays to `config/holiday.custom`. They are automatically merged into every driver result.

```
'custom' => [
    // Repeats every year — format: MM-DD
    ['name' => 'Company Day', 'date' => '06-15', 'type' => 'custom'],

    // One-time date — format: YYYY-MM-DD
    ['name' => 'Office Closed', 'date' => '2026-12-27', 'type' => 'custom'],

    // Region-restricted custom holiday
    ['name' => 'Munich Office Day', 'date' => '09-21', 'type' => 'custom', 'states' => ['BY']],
],
```

Supported types: `public`, `observance`, `custom`

---

Holiday Value Object
--------------------

[](#holiday-value-object)

Every method returns (or works with) a `Holiday` value object:

```
$holiday = Holiday::getHoliday('2026-12-25');

$holiday->name;                // "1. Weihnachtstag"
$holiday->date;                // Carbon instance
$holiday->country;             // "germany"
$holiday->type;                // HolidayType::Public
$holiday->states;              // null (nationwide) or ['BY', 'BW', ...]
$holiday->locale;              // "de_DE"
$holiday->key;                 // "christmas_day" (stable translation key)
$holiday->translate('en');     // "Christmas Day"
```

---

Testing
-------

[](#testing)

```
composer test
```

---

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance89

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity47

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

Total

2

Last Release

54d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/98804673?v=4)[Alexander Luedtke](/maintainers/AlexHL02)[@AlexHL02](https://github.com/AlexHL02)

---

Tags

facadelaravellaravel-packagephp

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/luedtke-laravel-holiday-facade/health.svg)

```
[![Health](https://phpackages.com/badges/luedtke-laravel-holiday-facade/health.svg)](https://phpackages.com/packages/luedtke-laravel-holiday-facade)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[aedart/athenaeum

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

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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