@nesto-software/moment-holiday-germany
Version:
The german locale for moment-holiday.
39 lines • 1.94 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const moment_holiday_core_1 = require("@nesto-software/moment-holiday-core");
const url = require("url");
const common_state_holiday_definitions_1 = require("./common-state-holiday-definitions");
const holiday_names_1 = require("./holiday-names");
class BEStateLocale extends moment_holiday_core_1.AbstractLocale {
constructor() {
super(...arguments);
this.legislation = new moment_holiday_core_1.Legislation("Gesetz über die Sonn- und Feiertage",
// tslint:disable-next-line:max-line-length
url.parse("http://gesetze.berlin.de/jportal/?quelle=jlink&query=FeiertG+BE+%C2%A7+1&psml=bsbeprod.psml&max=true"), "§1 Abs. 1");
}
getHolidayDefinitions() {
return common_state_holiday_definitions_1.COMMON_STATE_HOLIDAY_DEFINITIONS(this.legislation).concat([
{
name: holiday_names_1.HolidayName.WELTFRAUENTAG,
date: moment_holiday_core_1.NonRecurringDate.forPredicate(8, 2, (year) => {
return year > 2018;
}),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.PUBLIC),
new moment_holiday_core_1.LegislationTag(this.legislation),
],
}, {
name: holiday_names_1.HolidayName.TAG_DER_BEFREIUNG,
date: moment_holiday_core_1.NonRecurringDate.forPredicate(8, 4, (year) => {
return year === 2020; // only applies for 8.5.2020
}),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.PUBLIC),
new moment_holiday_core_1.LegislationTag(this.legislation),
],
},
]);
}
}
exports.BEStateLocale = BEStateLocale;
//# sourceMappingURL=be.state-locale.js.map