PHPackages                             hansott/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. hansott/holidays

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

hansott/holidays
================

Returns the holidays for a country

1.0.0(9y ago)020MITPHPPHP ~5.5|~7.0

Since Jul 23Pushed 8y ago1 watchersCompare

[ Source](https://github.com/hansott/holidays)[ Packagist](https://packagist.org/packages/hansott/holidays)[ Docs](https://github.com/hansott/holidays)[ RSS](/packages/hansott-holidays/feed)WikiDiscussions master Synced 4w ago

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

Holidays
========

[](#holidays)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a40329d570ee7f64e14c8c91cff63d4916b7f206159d572d96f179d518162093/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68616e736f74742f686f6c69646179732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hansott/holidays)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/47217bdc288fc9d850b3fede306c01e6d7a81e4f2f0bd3db681fa4888b6c9c12/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f68616e736f74742f686f6c69646179732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/hansott/holidays)[![Coverage Status](https://camo.githubusercontent.com/5df174ac143c36687ae5fe9097667660cef1b026dea8945db1fa02eed80d8c38/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f68616e736f74742f686f6c69646179732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/hansott/holidays/code-structure)[![Quality Score](https://camo.githubusercontent.com/e07a66b1fe37836a86b585b84a0e97344b8e92d82492a70d63f44e738eaa5196/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f68616e736f74742f686f6c69646179732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/hansott/holidays)[![Total Downloads](https://camo.githubusercontent.com/85a5f75cf1a84b7203494e1b8a558b4fe4d07695048199ffbbcc55f31383703f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68616e736f74742f686f6c69646179732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hansott/holidays)

Returns the holidays for a country.

Install
-------

[](#install)

Via Composer

```
$ composer require hansott/holidays
```

Supported countries and locales
-------------------------------

[](#supported-countries-and-locales)

- Belgium (BEL)
    - be-nl

Your country and/or locale not in the list? Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Usage
-----

[](#usage)

```
use HansOtt\Holiday\Factory;
use HansOtt\Holiday\Calendar\Year;

$factory = Factory::create();
$calendar = $factory->getCalendar('BEL');
$translator = $factory->getTranslator('BEL', 'nl-be');

$year = Year::current();
// or $year = new Year(2016);
$holidays = $calendar->getHolidays($year);
foreach ($holidays as $holiday) {
    $name = $translator->getName($holiday); // string
    $startsAt = $holiday->beginsAt(); // DateTimeImmutable
    $endsAt = $holiday->endsAt(); // DateTimeImmutable
    $formattedTime = $startsAt->format('l j F Y'); // string
    echo sprintf('%s -> %s', $name, $formattedTime) . PHP_EOL;
}
```

Output:

```
Nieuwjaar -> Friday 1 January 2016
Paasmaandag -> Monday 28 March 2016
Feest Van De Arbeid -> Sunday 1 May 2016
Onze Lieve Heer Hemelvaart -> Monday 11 April 2016
Pinkstermaandag -> Wednesday 18 May 2016
Nationale Feestdag -> Thursday 21 July 2016
Onze Lieve Vrouw Hemelvaart -> Monday 15 August 2016
Allerheiligen -> Tuesday 1 November 2016
Wapenstilstand -> Friday 11 November 2016
Kerstmis -> Sunday 25 December 2016

```

Change log
----------

[](#change-log)

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

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

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

Security
--------

[](#security)

If you discover any security related issues, please email **hansott at hotmail be** instead of using the issue tracker.

Credits
-------

[](#credits)

- [Hans Ott](https://github.com/hansott)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

3629d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3886384?v=4)[Hans Ott](/maintainers/hansott)[@hansott](https://github.com/hansott)

---

Top Contributors

[![hansott](https://avatars.githubusercontent.com/u/3886384?v=4)](https://github.com/hansott "hansott (13 commits)")

---

Tags

holidaysphpholidayshansott

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/hansott-holidays/health.svg)

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

###  Alternatives

[spatie/holidays

Calculate public holidays

400765.6k2](/packages/spatie-holidays)[umulmrum/holiday

A PHP library to compute holidays. It's something :-)

92371.2k1](/packages/umulmrum-holiday)[geoffreyrose/us-holidays

US Holidays Wrapper for the Carbon DateTime Library.

62753.4k3](/packages/geoffreyrose-us-holidays)[holidayapi/holidayapi-php

Official PHP library for Holiday API

35229.3k1](/packages/holidayapi-holidayapi-php)[citco/carbon

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

16412.2k5](/packages/citco-carbon)[aeon-php/calendar-holidays

Holidays calendar abstraction layer for Aeon Time management framework

14214.0k3](/packages/aeon-php-calendar-holidays)

PHPackages © 2026

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