designmynight / uk-public-holidays
PHP package to easily determine whether a given date is a public holiday in the UK
v1.1.0
2018-04-11 09:29 UTC
Requires
- php: >=7.1
- nesbot/carbon: ^1.22
Requires (Dev)
- phpunit/phpunit: 6.*
This package is auto-updated.
Last update: 2024-12-17 19:09:56 UTC
README
PHP package to determine whether a given date is a public holiday in the UK.
Public holiday data is from gov.uk
Example
Date::isFirstWorkingDayOfTheMonth(Carbon::today()); Date::isHoliday(Carbon::today()); Date::isWorkingDay(Carbon::today()) Date::nextWorkingDay(); Date::previousWorkingDay();
Regions
The default region is 'England and Wales'. To change it use PublicHolidays::setRegion()
:
PublicHolidays::setRegion('scotland'); PublicHolidays::setRegion('northern-ireland');