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 holidays possible improvements #206

Closed
iquito opened this issue Feb 22, 2020 · 2 comments
Closed

Switzerland holidays possible improvements #206

iquito opened this issue Feb 22, 2020 · 2 comments

Comments

@iquito
Copy link

iquito commented Feb 22, 2020

I was trying to use this library for the holidays in Switzerland, but found the following unexpected situations:

  • The base class "Switzerland" only has one holiday (1. of August), but actually there are 4 holidays which are universal across all of Switzerland. This is seen in this table: https://en.wikipedia.org/wiki/Public_holidays_in_Switzerland
  • The subclasses for the regions mark most holidays as "TYPE_OTHER", but these are official holidays in the designated parts of the countries, so they should be marked as official.
  • It would make sense to have another class with the "common sense" holidays in Switzerland. These are the holidays that national companies (like the postal service or the train services) have as the official holidays in all parts of Switzerland, as following the regional differences would be maddening. This is described in the German article about public holidays in Switzerland (https://de.wikipedia.org/wiki/Feiertage_in_der_Schweiz) and there are 9 of these holidays. From my perspective it would even make sense to use those in the "Switzerland" class, as if you want the holidays for a whole country you do not want to lowest common denominator, you want the common sense denominator which are valid for public services and cross-regional companies/services.
  • It would be nice to be able to easily combine holidays for different regions or even all regions (this would also be interesting for combining countries). The use cases would be to, for example, choose a date which is not a holiday in any parts of Switzerland, or to check if a date is a holiday in all of Switzerland, Germany or Austria. This is technically possible now in a manual way, but especially for Switzerland this is not pleasant (as one has to combine 26 holiday calendars), and the library could be helpful in making this easier.

I can help in correcting the Swiss holidays (and make a pull request) and could also make a suggestion on how to do a common sense Switzerland class or how to change the existing classes, if such help is welcome. The combination of whole countries in terms of holidays might need some discussion, but I would be willing to help with that too.

@stelgenhof
Copy link
Member

@iquito Thank you very much for bringing this up. Definitely this could welcome some updates as not always the latest or correct logic may be implemented.

Please feel free to add PR's to fix the issues you mentioned. If you do, I strongly suggest to create for each case/issue a separate PR. That way it is easier to manage. Don't forget to include unit tests as well!

Cheers! Sacha

@github-actions
Copy link

This issue has been open 60 days with no activity. Please remove the stale label or comment, or this will be closed in 10 days.

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

2 participants