@nesto-software/moment-holiday-sweden
Version:
The swedish locale for moment-holiday.
264 lines • 13.8 kB
JavaScript
"use strict";
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 midsummer_dependent_date_1 = require("../date/midsummer-dependent-date");
var all_hallows_dependent_date_1 = require("../date/all-hallows-dependent-date");
var SwedishCountryLocale = /** @class */ (function (_super) {
__extends(SwedishCountryLocale, _super);
function SwedishCountryLocale() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.allmanna_helgdagar_1989_253 = new moment_holiday_core_1.Legislation("Lag (1989:253) om allmänna helgdagar", url.parse("https://www.riksdagen.se/sv/dokument-lagar/dokument/svensk-forfattningssamling/lag-1989253-om-allmanna-helgdagar_sfs-1989-253"));
_this.kollektivavtal = new moment_holiday_core_1.Legislation("Kollektivavtal");
return _this;
}
SwedishCountryLocale.prototype.getHolidayDefinitions = function () {
return [
{
name: holiday_names_1.HolidayName.NYARSDAGEN,
date: new moment_holiday_core_1.RecurringDate(1, 0),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.PUBLIC),
new moment_holiday_core_1.LegislationTag(this.allmanna_helgdagar_1989_253),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
],
},
{
name: holiday_names_1.HolidayName.TRETTONDAGSAFTON,
date: new moment_holiday_core_1.RecurringDate(5, 0),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.OBSERVANCE),
new moment_holiday_core_1.LegislationTag(this.kollektivavtal),
new moment_holiday_core_1.LateTag(),
],
},
{
name: holiday_names_1.HolidayName.TRETTONDEDAG_JUL,
date: new moment_holiday_core_1.RecurringDate(6, 0),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.PUBLIC),
new moment_holiday_core_1.LegislationTag(this.allmanna_helgdagar_1989_253),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
],
},
{
name: holiday_names_1.HolidayName.SKARTORSDAGEN,
date: new moment_holiday_core_1.EasterDependentDate(-3),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.OBSERVANCE),
new moment_holiday_core_1.LegislationTag(this.kollektivavtal),
new moment_holiday_core_1.LateTag(),
],
},
{
name: holiday_names_1.HolidayName.LANGFREDAGEN,
date: new moment_holiday_core_1.EasterDependentDate(-2),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.PUBLIC),
new moment_holiday_core_1.LegislationTag(this.allmanna_helgdagar_1989_253),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
],
},
{
name: holiday_names_1.HolidayName.PASKAFTON,
date: new moment_holiday_core_1.EasterDependentDate(-1),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.OBSERVANCE),
new moment_holiday_core_1.LegislationTag(this.kollektivavtal),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
],
},
{
name: holiday_names_1.HolidayName.PASKDAGEN,
date: new moment_holiday_core_1.EasterDependentDate(0),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.PUBLIC),
new moment_holiday_core_1.LegislationTag(this.allmanna_helgdagar_1989_253),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
],
},
{
name: holiday_names_1.HolidayName.ANNANDAG_PASK,
date: new moment_holiday_core_1.EasterDependentDate(+1),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.PUBLIC),
new moment_holiday_core_1.LegislationTag(this.allmanna_helgdagar_1989_253),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
],
},
{
name: holiday_names_1.HolidayName.VALBORGSMASSOAFTON,
date: new moment_holiday_core_1.RecurringDate(30, 3),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.OBSERVANCE),
new moment_holiday_core_1.LegislationTag(this.kollektivavtal),
new moment_holiday_core_1.LateTag(),
],
},
{
name: holiday_names_1.HolidayName.FORSTA_MAJ,
date: new moment_holiday_core_1.RecurringDate(1, 4),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.PUBLIC),
new moment_holiday_core_1.LegislationTag(this.allmanna_helgdagar_1989_253),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
],
},
{
name: holiday_names_1.HolidayName.KRISTI_HIMMELFARD,
date: new moment_holiday_core_1.EasterDependentDate(+39),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.PUBLIC),
new moment_holiday_core_1.LegislationTag(this.allmanna_helgdagar_1989_253),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
],
},
{
name: holiday_names_1.HolidayName.PINGSTAFTON,
date: new moment_holiday_core_1.EasterDependentDate(+48),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.OBSERVANCE),
new moment_holiday_core_1.LegislationTag(this.kollektivavtal),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
],
},
{
name: holiday_names_1.HolidayName.PINGSTDAGEN,
date: new moment_holiday_core_1.EasterDependentDate(+49),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.PUBLIC),
new moment_holiday_core_1.LegislationTag(this.allmanna_helgdagar_1989_253),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
],
},
{
name: holiday_names_1.HolidayName.ANNANDAG_PINGST,
date: new moment_holiday_core_1.EasterDependentDate(+50),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.OBSERVANCE),
new moment_holiday_core_1.LegislationTag(this.kollektivavtal),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
],
},
{
name: holiday_names_1.HolidayName.NATIONALDAGEN,
date: new moment_holiday_core_1.RecurringDate(6, 5),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.PUBLIC),
new moment_holiday_core_1.LegislationTag(this.allmanna_helgdagar_1989_253),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
],
},
{
name: holiday_names_1.HolidayName.MIDSOMMARAFTON,
date: new midsummer_dependent_date_1.MidsummerDependentDate(-1),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.OBSERVANCE),
new moment_holiday_core_1.LegislationTag(this.kollektivavtal),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
new moment_holiday_core_1.LateTag(),
],
},
{
name: holiday_names_1.HolidayName.MIDSOMMARDAGEN,
date: new midsummer_dependent_date_1.MidsummerDependentDate(0),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.PUBLIC),
new moment_holiday_core_1.LegislationTag(this.allmanna_helgdagar_1989_253),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
],
},
{
name: holiday_names_1.HolidayName.SONDAG_EFTER_MIDSOMMAR,
date: new midsummer_dependent_date_1.MidsummerDependentDate(+1),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.OBSERVANCE),
new moment_holiday_core_1.LegislationTag(this.kollektivavtal),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
],
},
{
name: holiday_names_1.HolidayName.ALLHELGONAAFTON,
date: new all_hallows_dependent_date_1.AllHallowsDependentDate(-1),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.OBSERVANCE),
new moment_holiday_core_1.LegislationTag(this.kollektivavtal),
new moment_holiday_core_1.LateTag(),
],
},
{
name: holiday_names_1.HolidayName.ALLA_HELGONS_DAG,
date: new all_hallows_dependent_date_1.AllHallowsDependentDate(0),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.PUBLIC),
new moment_holiday_core_1.LegislationTag(this.allmanna_helgdagar_1989_253),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
],
},
{
name: holiday_names_1.HolidayName.DAGEN_FORE_JULAFTON,
date: new moment_holiday_core_1.RecurringDate(23, 11),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.OBSERVANCE),
new moment_holiday_core_1.LegislationTag(this.kollektivavtal),
new moment_holiday_core_1.LateTag(),
],
},
{
name: holiday_names_1.HolidayName.JULAFTON,
date: new moment_holiday_core_1.RecurringDate(24, 11),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.OBSERVANCE),
new moment_holiday_core_1.LegislationTag(this.kollektivavtal),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
new moment_holiday_core_1.LateTag(),
],
},
{
name: holiday_names_1.HolidayName.JULDAGEN,
date: new moment_holiday_core_1.RecurringDate(25, 11),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.PUBLIC),
new moment_holiday_core_1.LegislationTag(this.allmanna_helgdagar_1989_253),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
],
},
{
name: holiday_names_1.HolidayName.ANNANDAG_JUL,
date: new moment_holiday_core_1.RecurringDate(26, 11),
tags: [
new moment_holiday_core_1.TypeTag(moment_holiday_core_1.TypeTagValue.PUBLIC),
new moment_holiday_core_1.LegislationTag(this.allmanna_helgdagar_1989_253),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
],
},
{
name: holiday_names_1.HolidayName.NYARSAFTON,
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.LegislationTag(this.kollektivavtal),
new moment_holiday_core_1.SpecialSurchargeDayTag(),
new moment_holiday_core_1.LateTag(),
],
},
];
};
return SwedishCountryLocale;
}(moment_holiday_core_1.AbstractLocale));
exports.SwedishCountryLocale = SwedishCountryLocale;
//# sourceMappingURL=country-locale.js.map