workingday-uk
Promise-based node package to determine if a date is a working day in the UK, based on being a weekday, and not a bank holiday, according to the UK government website.
Usage
- Takes an optional Date object or a string in the format YYYY-mm-DD. Default: today
- Takes an optional boolean whether to work offline. Default: true (using a local copy of the GOV.UK bank holiday API response)
Examples
Use with no params for today
const isWorkingDay =
Use with a date
const isWorkingDay = const dateToCheck = 2000 0 1 //1st Jan 2000
Use with a date string of YYYY-MM-DD
const isWorkingDay = const dateToCheck = '2019-12-24'
Check online for today
const isWorkingDay =
Check online for Christmas Day
const isWorkingDay = const dateToCheck = '2019-12-25'