PHPackages                             sourcepot/bankholidays - 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. sourcepot/bankholidays

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

sourcepot/bankholidays
======================

Bank holidays for the UK and Germany

v2.2.0(1y ago)01261MITPHPPHP &gt;=8.0

Since Feb 16Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/SourcePot/BankHolidays)[ Packagist](https://packagist.org/packages/sourcepot/bankholidays)[ Docs](https://datapool.info)[ RSS](/packages/sourcepot-bankholidays/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (1)Versions (9)Used By (1)

Bank Holidays
=============

[](#bank-holidays)

The repository contains the PHP class `SourcePot\BankHolidays\holidays` which provides country and regions specific holidays as event-arrays. The country-specific bank holidays are derived from different sources such as the goverment (for the UK from *Gov.uk*) or calculated from rules.

Depending on the country, dates are derived from rules (such as for Germany) or a goverment internet resource is used (such as *Gov.uk*).

Note

The UK bank holidays are only available for a couple of years into the past and future.

You can install the www-project using composer: `composer create-project sourcepot/bankholidays {target dir}`Just set your www-root directory to `{target dir}/src/www/`.

Code samples
------------

[](#code-samples)

The following code sample creates an instance of the holiday object for the year *2025* and country *Germany*. Method `SourcePot\BankHolidays\holidays→getHolidays('Bavaria')` is a holiday iterator, returning an holiday event with every iteration.

```
namespace SourcePot\BankHolidays;

require_once('../php/holidays.php');

$year=2025;
$country='de';

$holidayObj = new holidays($year,$country);

foreach($holidayObj->getHolidays('Bavaria') as $event){
    var_dump($event);
}

```

Test web page
-------------

[](#test-web-page)

File `./www/index.php` can be used to evaluate the respository.

[![Web page screenshot](./assets/uk-sample-result.png)](./assets/uk-sample-result.png)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance49

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

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

Every ~58 days

Recently: every ~86 days

Total

8

Last Release

416d ago

Major Versions

v1.1.1 → v2.0.02025-03-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/203fc800c6762aad4804f2e278a35262e603691a057035ff200827499e53f434?d=identicon)[SourcePot](/maintainers/SourcePot)

---

Top Contributors

[![SourcePot](https://avatars.githubusercontent.com/u/115737488?v=4)](https://github.com/SourcePot "SourcePot (42 commits)")

---

Tags

calendargermanyholidaysspainukBank Holiday

### Embed Badge

![Health badge](/badges/sourcepot-bankholidays/health.svg)

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

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[geoffreyrose/us-holidays

US Holidays Wrapper for the Carbon DateTime Library.

62717.0k2](/packages/geoffreyrose-us-holidays)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[org_heigl/holidaychecker

Check for holidays - localeaware

843.4k](/packages/org-heigl-holidaychecker)[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)
