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-11-17 18:58:54 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');