moment-feiertage
Version:
Moment.js Plugin for german holidays; check if a given Date is a german holiday
23 lines (22 loc) • 577 B
TypeScript
import moment = require('moment');
export = moment;
interface IsHolidayResult {
allStates: boolean;
holidayName: string;
holidayStates: Array<string>;
testedStates: Array<string>;
}
interface Holiday {
date: moment.Moment;
state: Array<string>;
}
interface Holidays {
[key: string]: Holiday;
}
declare module 'moment' {
interface Moment {
isHoliday: (_states?: string | Array<string>) => boolean | string | IsHolidayResult;
}
function getHolidaysByYear(_year: number): Holidays;
function getAllStateCodes(): Array<string>;
}