opencal / holidays
Holidays of 100+ countries in a PHP composer package.
1.0.1
2025-09-01 10:07 UTC
Requires
- php: >=8.2.0
- ext-mbstring: *
- thecodingmachine/safe: ^3.1
Requires (Dev)
- ergebnis/composer-normalize: ^2.47
- guzzlehttp/guzzle: ^7.10
- mayflower/mo4-coding-standard: 10.0.2
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.1
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^11.5
- spatie/phpunit-snapshot-assertions: ^5.2
- symfony/console: ^7.3
- symfony/deprecation-contracts: ^2.1 || ^3.0
- symfony/finder: ^7.3
- symfony/serializer: ^7.3
- thecodingmachine/phpstan-safe-rule: ^1.4
- var-lab/coding-standard: ^2.2
Conflicts
- php: 7.4.6
README
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.