1.0.0 • Published 12 months ago

@itenium/date-holidays-be v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

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

date-holidays-be @ npmjs.com

npm run build
npm login  # username: itenium
npm publish --access public
1.0.0

12 months ago

0.0.2

12 months ago

0.4.0

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago

0.0.1

1 year ago