Skip to content

PHP package to determine if a date is a public holiday in the UK

License

Notifications You must be signed in to change notification settings

designmynight/uk-public-holidays

Repository files navigation

UK Public Holidays

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');