@bbodek/holidays
v1.0.2
Published
Korean public holidays for internal use
Downloads
238
Readme
@bbodek/holidays
Usage
import { PUBLIC_HOLIDAYS, isHoliday } from '@bbodek/holidays';
const { PUBLIC_HOLIDAYS, isHoliday } = require('@bbodek/holidays'); // CJS Support
API Spec
isHoliday(date: Date): boolean
import { isHoliday } from '@bbodek/holidays';
console.log(isHoliday(new Date('2024-01-01T00:00:00.000+09:00'))); // true
console.log(isHoliday(new Date('2023-12-31T15:00:00.000Z'))); // true
console.log(isHoliday(new Date('2024-01-02T00:00:00.000+09:00'))); // false
PUBLIC_HOLIDAYS: { date: string; name: string }[]
import { PUBLIC_HOLIDAYS } from '@bbodek/holidays';
console.log(PUBLIC_HOLIDAYS); // [{ date: '2024-01-01', name: '새해 첫날' } ...