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

This package is auto-updated.

Last update: 2024-10-17 18:46:07 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');