dagweb/php-public-holiday

Tool for calculate public holiday dates

Maintainers

Package info

github.com/Dagweb/php-public-holiday

Documentation

pkg:composer/dagweb/php-public-holiday

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.2.0 2025-08-22 18:32 UTC

This package is auto-updated.

Last update: 2026-03-22 20:10:09 UTC


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.