dagweb / php-public-holiday
Tool for calculate public holiday dates
v1.2.0
2025-08-22 18:32 UTC
Requires
- php: >=8.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.84
- phpunit/phpunit: ^12.2
- vimeo/psalm: ^6.12
README
PHP-public-holiday is a PHP package that give you enums to retrieve public holidays dates.
Supported countries:
| Country | Enum | Listed public holidays (Official Name used By Country) |
|---|---|---|
| France | \Dagweb\PhpPublicHoliday\France\PublicHolidays |
- Jour de l'an - Lundi de Pâques - Fête du travail - Victoire 1945 - Ascension - Lundi de Pentecôte - Fête Nationale - Assomption - Toussaint - Armistice 1918 - Jour de Noël |
| Monaco | \Dagweb\PhpPublicHoliday\Monaco\PublicHolidays |
- Jour de l'an - Sainte Dévote - Lundi de Pâques - 1er Mai - Ascension - Lundi de Pentecôte - La Fête Dieu - Assomption - Toussaint - La Fête du Prince - L'immaculée Conception - Jour de Noël |
Usage
Import Enum class and use it.
To get the spécific date, use the getDate(self $case, ?int $year = null): \DateTimeImmutable method of the Enum.
To get the list of all dates, use the getPublicHolidays(?int $year = null): array<string, \DateTimeImmutable> method of the Enum.