Holidays of 100+ countries in a PHP composer package.
|
|
||
|---|---|---|
| .gitlab | ||
| bin | ||
| ci | ||
| src | ||
| tests/Data | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| composer.json | ||
| composer.lock | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| phpstan.neon | ||
| phpunit.dist.xml | ||
| README.md | ||
Holidays PHP package
This PHP package contains the holidays of 100+ countries for the next 5 years (including 2025).
Installation
composer require opencal/holidays
Usage
Check if a country is supported:
<?php
$countries = (new \OpenCal\Holidays\Data\Countries())->getAll();
$exists = isset($countries['DE']) // requires a alpha-2 country code.
Get the holidays of a specific country:
<?php
$holidays = (new \OpenCal\Holidays\Data\Holidays())->getAll();
$holidays2025 = $holidays['DE'][2025];
Contribute
See contribution guide.