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: 2022-06-17 13:46:51 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');