Skip to content

Add missing Swiss cantonal public holidays - #334

Closed
piruzmand wants to merge 1 commit into
spatie:mainfrom
piruzmand:add-missing-swiss-cantonal-holidays
Closed

Add missing Swiss cantonal public holidays#334
piruzmand wants to merge 1 commit into
spatie:mainfrom
piruzmand:add-missing-swiss-cantonal-holidays

Conversation

@piruzmand

Copy link
Copy Markdown
Contributor

Summary

Fills in the missing Swiss public holidays in Switzerland.php ; four previously-unmodeled
holidays, corrected canton-by-canton assignments, and proper Reformed/Catholic district support
for the cantons that legally split on it. Verified against a full canton-by-canton reference table
(holiday × canton × entire-region/Catholic-district/Reformed-district).

Changes

New holidays

  • Näfelser Fahrt (GL) - first Thursday of April, shifted +7 days when that date is Maundy Thursday (Holy Week)
  • Peter und Paul / Saints Peter and Paul (TI) - June 29
  • Bruderklausenfest / St Nicholas of Flüe (OW) - September 25
  • Fest der Unabhängigkeit / Jura Independence Day (JU) - June 23

Reformed/Catholic district support
Extends the existing ch-fr / ch-fr-c / ch-fr-r convention to the other three cantons that
split legally on denomination: adds ch-ag-c/ch-ag-r, ch-gr-c/ch-gr-r, ch-so-c/ch-so-r.
Per that convention, the bare canton code (ch-ag, ch-fr, ch-gr, ch-so) now returns
entire-region holidays only - Catholic- or Reformed-district-only holidays (e.g. Corpus Christi,
Assumption Day) are scoped strictly to their -c/-r variant and no longer leak into the bare code.

Corrected canton assignments (highlights - see diff for the full set)

  • GL: added Berchtold's Day and the Näfels Ride; removed All Saints' Day and Immaculate Conception (not actually observed there)
  • ZH: added Berchtold's Day; removed "Buss- und Bettag" (not applicable to Zürich)
  • NE: added Berchtold's Day, Easter Monday, Labour Day, Whit Monday
  • LU, UR, SZ, NW, AI, TI: filled in missing Catholic feast days / Easter Monday / Whit Monday per canton

Translations
Added French and Italian names for the four new holidays; removed the now-unused
"Buss- und Bettag" (non-Monday) translations (the Monday variant, used by VD, is unaffected).

Test plan

  • Added a dataset-driven snapshot test across every region code (all cantons + the 6 new district variants)
  • Explicit assertions for the Näfelser Fahrt Holy Week shift (unshifted in 2024, shifted in 2026)
  • Explicit assertions for each new canton-specific holiday and that they don't leak into other cantons
  • Explicit assertions isolating Catholic vs. Reformed vs. bare/entire-region output for AG, GR, SO
  • Explicit assertion that Glarus does not observe the Marian feasts
  • Translation assertions (fr, it) for the new holidays
  • vendor/bin/pest --ci: 655 passed, 1710 assertions
  • vendor/bin/phpstan analyse: no errors
  • vendor/bin/pint --test: clean

@Nielsvanpach

Nielsvanpach commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Thanks, but going to hold off on this one until there's an actual need.

@piruzmand

Copy link
Copy Markdown
Contributor Author

Thanks, but going to hold off on this one until there's an actual need.

Hey, thanks for your response. We have customers in Switzerland who use our calendar to plan tasks and manage employee absences. As you probably know, Swiss public holidays are quite different from those in many other countries because they vary significantly by canton. The changes I proposed aim to improve support for those regional differences. While the implementation isn't perfect, it provides much better coverage than the current state.

I completely understand your decision. Let's see if more users run into the same need in the future., thanks again for taking the time to review the merge request and I hope we can get these changes merged if the demand grows.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants