JSPM

workingday-uk

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q35415F
  • License MIT

Determine if a date is a working day in the UK, according to UK government website

Package Exports

  • workingday-uk

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (workingday-uk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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

Use with no params for today

const isWorkingDay = require('workingday-uk')

isWorkingDay()
.then(iwd => {
    console.log('Today is a working day? ' + iwd)
})

Use with a date

const isWorkingDay = require('workingday-uk')

const dateToCheck = new Date(2000, 0, 1) //1st Jan 2000

isWorkingDay(dateToCheck)
.then(iwd => {
    console.log(iwd) //False
})

Use with a date string of YYYY-MM-DD

const isWorkingDay = require('workingday-uk')

const dateToCheck = '2019-12-24'

isWorkingDay(dateToCheck)
.then(iwd => {
    console.log(iwd) //True - Tuesday, and not a bank holiday
})