Socket
Socket
Sign inDemoInstall

uk-bank-holidays

Package Overview
Dependencies
51
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    uk-bank-holidays

Gets a list of UK bank holidays from the government feed.


Version published
Weekly downloads
1.3K
increased by9.39%
Maintainers
1
Install size
10.1 MB
Created
Weekly downloads
 

Readme

Source

UK bank holidays

This package will help you determine when UK bank holidays are, using the Government's feed.

Installation

$ npm install --save uk-bank-holidays

Usage

import HolidayFeed from 'uk-bank-holidays';

//...

let feed = new HolidayFeed();
await feed.load();

let divisions = feed.divisions();
// [ 'england-and-wales', 'scotland', 'northern-ireland' ]

let scotland = feed.divisions('scotland');
scotland.holidays(); // all holidays in the feed
scotland.holidays(startDate); // holidays on or after start date
scotland.holidays(startDate, endDate); // holidays between the dates (inclusive)

The holidays method returns an array of objects that look like this:

{ title: 'Christmas Day',
    date: '2017-12-25',
    notes: '',
    bunting: true }

I have no idea what the bunting field is for...

License etc

This is MIT licensed: feel free to do what you like with it. Comments, suggestions, issues and pull requests welcome.

Keywords

FAQs

Last updated on 26 Jan 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc