se-bank-holidays
v1.1.7
Published
Swedish Bank Holidays (sv. bankhelgdagar) implementation in Typescript
Downloads
2,312
Readme
Swedish Bank Holidays
Typescript library for looking up Swedish Bank Holidays (bankhelgdagar). Zero dependencies. Providing an easy to use API to check whether a specific date is a bank holiday (or bank day) in Sweden, and also offers basic date subtraction / addition support.
Getting started
Node
Install using npm:
npm install se-bank-holidays
Then require it to any module:
const holidays = require("se-bank-holidays");
const test = holidays.isHoliday(new Date("2021-12-24")); // => true
Browser
To use the library in browser, use generally available CDN solutions, or download and use distribution files directly in your code (dist/index.js
, dist/index.min.js
or dist/index.mjs
).
TODO
[ ] Improved documentation [ ] Timezone support (consider implementing https://github.com/js-joda/js-joda)
Credits
Creds to https://github.com/ryanseys/lune for inspiring on the lunar calculation utiility, use in this library.
License
MIT