@nesto-software/moment-holiday-germany
Version:
The german locale for moment-holiday.
59 lines • 2.94 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var moment_holiday_core_1 = require("@nesto-software/moment-holiday-core");
var url = require("url");
var holiday_names_1 = require("./holiday-names");
var GermanCountryLocale = /** @class */ (function (_super) {
__extends(GermanCountryLocale, _super);
function GermanCountryLocale() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.legislation = new moment_holiday_core_1.Legislation("Einigungsvertrag", url.parse("https://www.gesetze-im-internet.de/einigvtr/BJNR208890990.html"), "Kap. 1 Art. 2 II");
_this.legislationForReformationstag = new moment_holiday_core_1.Legislation("Unterschiedliche Landesverordnungen der jeweiligen Bundesländer");
return _this;
}
GermanCountryLocale.prototype.getHolidayDefinitions = function () {
return [
{
name: holiday_names_1.HolidayName.TAG_DER_DEUTSCHEN_EINHEIT,
date: new moment_holiday_core_1.RecurringDate(3, 9),
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.SILVESTER,
date: new moment_holiday_core_1.RecurringDate(31, 11),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.OBSERVANCE),
new moment_holiday_core_1.LateTag(),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
],
},
{
name: holiday_names_1.HolidayName.REFORMATIONSTAG_JUBILAEUM,
date: moment_holiday_core_1.NonRecurringDate.forYears(31, 9, [2017]),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.PUBLIC),
new moment_holiday_core_1.LegislationTag(this.legislationForReformationstag),
],
},
];
};
return GermanCountryLocale;
}(moment_holiday_core_1.AbstractLocale));
exports.GermanCountryLocale = GermanCountryLocale;
//# sourceMappingURL=country-locale.js.map