Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switzerland - Holiday adjustments #683

Closed
tinohager opened this issue Sep 23, 2024 · 9 comments
Closed

Switzerland - Holiday adjustments #683

tinohager opened this issue Sep 23, 2024 · 9 comments
Assignees

Comments

@tinohager
Copy link
Member

A customer of Nager Date has kindly compiled this information which I will include in the next few days.

Schweizer Feiertage.pdf

@tinohager
Copy link
Member Author

@ugobe, @SuizoSuizo, @bsrdwild, @klamir051, @Iuri-Dias

Hello everyone, as I would like to make some changes to the Swiss holidays. I would be pleased if you could perhaps also have a look at this.

In Switzerland, there is a law that allows for a maximum of eight public holidays per year to be treated the same as Sundays. These holidays are determined at the cantonal level, with each canton deciding which holidays qualify.

@tinohager
Copy link
Member Author

“Näfelser Fahrt” is currently being ignored

@SuizoSuizo
Copy link

SuizoSuizo commented Sep 28, 2024 via email

@klamir051
Copy link

Hi Tino

I've never heard of some of this rules, especially the limit of eight public holiydas. But I'm not that deep in the public holiday game to give you a reliable answer. The PDF seems kinda trustworthy, even the sources are mentioned. I don't find any inconsistencies while skimming the table.

tinohager added a commit that referenced this issue Sep 30, 2024
* Switzerland - Fix Epiphany

- #683

* cleanup namespaces
tinohager added a commit that referenced this issue Sep 30, 2024
* Switzerland - Saint Joseph's Day

- #683

* Update SwitzerlandHolidayProvider.cs
tinohager added a commit that referenced this issue Sep 30, 2024
tinohager added a commit that referenced this issue Sep 30, 2024
tinohager added a commit that referenced this issue Sep 30, 2024
tinohager added a commit that referenced this issue Oct 1, 2024
* Switzerland - Fix St. Stephen's Day

- #683

* optimize logic for CH-AR, CH-AI, CH-NE
@tinohager
Copy link
Member Author

All changes announced above have now been implemented

@tinohager
Copy link
Member Author

The holiday updates now available online
https://date.nager.at/PublicHoliday/Switzerland

@klamir051
Copy link

Hi Tino

You've done some decent work here! As far as I can see, some public holidays are now listed twice, once with type 'Public', once with type 'Observance'. So far, so good, but what I don't get: why e.g. Easter Monday gets listed twice for the year 2025

{
	"date": "2025-04-21",
	"counties": "CH-ZH,CH-BE,CH-GL,CH-FR,CH-BS,CH-BL,CH-SH,CH-AR,CH-AI,CH-SG,CH-GR,CH-AG,CH-TG,CH-TI,CH-VD,CH-GE,CH-JU",
	"types": "Public"
},
{
	"date": "2025-04-21",
	"counties": "CH-UR,CH-SZ,CH-OW",
	"types": "Observance"
}

But only listed once for the year 2026 - with all cantons, like before your adjustments:

{
	"date": "2026-04-06",
	"counties": "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",
	"types": "Public"
}

In 2027, Easter Monday again is listed twice, in 2023 only once. I observe the same behavior with other public holidays too, like Epiphany or St. Stephen's Day.

Am I missing something?

Best

@tinohager
Copy link
Member Author

tinohager commented Oct 5, 2024

@klamir051 Does the data come from the public api? Then it is probably still due to the cache.

@klamir051
Copy link

I queried the data via public API and with your website, e.g. https://date.nager.at/PublicHoliday/Switzerland/2026. Now everything seems aligned and public holidays of type 'Observance' occur for every year. So cache might have been rebuilt in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants