Skip to content

Commit

Permalink
Switzerland - Fix Corpus Christi
Browse files Browse the repository at this point in the history
  • Loading branch information
tinohager committed Sep 26, 2024
1 parent 9addb90 commit b3a41ae
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/Nager.Date/HolidayProviders/SwitzerlandHolidayProvider.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Nager.Date.Extensions;
using Nager.Date.Helpers;
using Nager.Date.Models;
using Nager.Date.ReligiousProviders;
Expand Down Expand Up @@ -194,12 +195,27 @@ protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(in
this._catholicProvider.EasterMonday("Ostermontag", year).SetSubdivisionCodes("CH-ZH", "CH-BE", "CH-LU", "CH-UR", "CH-SZ", "CH-OW", "CH-NW", "CH-GL", "CH-ZG", "CH-FR", "CH-SO", "CH-BS", "CH-BL", "CH-SH", "CH-AR", "CH-AI", "CH-SG", "CH-GR", "CH-AG", "CH-TG", "CH-TI", "CH-VD", "CH-NE", "CH-GE", "CH-JU"),
this._catholicProvider.AscensionDay("Auffahrt", year),
this._catholicProvider.WhitMonday("Pfingstmontag", year).SetSubdivisionCodes("CH-ZH", "CH-BE", "CH-LU", "CH-UR", "CH-SZ", "CH-OW", "CH-NW", "CH-GL", "CH-ZG", "CH-FR", "CH-BS", "CH-BL", "CH-SH", "CH-AR", "CH-AI", "CH-SG", "CH-GR", "CH-TG", "CH-TI", "CH-VD", "CH-NE", "CH-GE", "CH-JU"),
this._catholicProvider.CorpusChristi("Fronleichnam", year).SetSubdivisionCodes("CH-LU", "CH-UR", "CH-SZ", "CH-OW", "CH-NW", "CH-ZG", "CH-AI", "CH-TI", "CH-VS", "CH-JU")
};

holidaySpecifications.AddRangeIfNotNull(this.CorpusChristi(year));

return holidaySpecifications;
}

private HolidaySpecification[] CorpusChristi(int year)
{
var localName = "Fronleichnam";

var specificationPublic = this._catholicProvider.CorpusChristi(localName, year).SetSubdivisionCodes("CH-LU", "CH-UR", "CH-SZ", "CH-OW", "CH-NW", "CH-ZG", "CH-FR", "CH-SO", "CH-AI", "CH-AG", "CH-VS", "CH-JU");
var specificationObservance = this._catholicProvider.CorpusChristi(localName, year).SetSubdivisionCodes("CH-TI").SetHolidayTypes(HolidayTypes.Observance);

return
[
specificationPublic,
specificationObservance
];
}

/// <inheritdoc/>
public override IEnumerable<string> GetSources()
{
Expand Down

0 comments on commit b3a41ae

Please sign in to comment.