@itenium/date-holidays-be
v1.0.0
Published
Zero dependency functions to determine the official Belgian holidays for a given year in NL/FR/EN/DE
Downloads
19
Readme
date-holidays-be
Provides the official Belgian holidays in NL/FR/DE/EN.
A zero dependency package to get the official Belgian holidays.
Install
npm install --save @itenium/date-holidays-be
Use
import { isHoliday, getHolidays } from '@itenium/date-holidays-be';
const holiday: boolean = isHoliday(new Date(2023, 0, 1));
const holidays: Holiday[] = getHolidays(2023);
Typings
type Holiday = {
date: Date;
labels: {
nl: string;
fr: string;
de: string;
en: string;
}
}
Motivation
If you just need to calculate something very specific,
importing date-holidays
results in a whopping 10MB dependency.
This turned out to be a performance issue that came up during our "React Component Profiling" technical session at itenium.
Development
npm install
npm run build
# Run tests
npm t
Publish
npm run build
npm login # username: itenium
npm publish --access public