martinjw / Holiday

Calculate Public Holidays

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bavarian Holiday Assumption is not valid in all of Bavaria

mrutsch opened this issue · comments

Hello @martinjw,

we use your PublicHoliday package in our application and appreciate your hard work!

In issue #104, there was a change, adding Assumption for all of Bavaria, even though the map shows that it is not valid everywhere. This holiday is only for parts of Bavaria that are inhabited by a majority of catholics, so it can actually change over time.

It would be great if you could revert this commit again or maybe add a differentiation between catholic and non-catholic parts of Bavaria. Thanks!

I can make the HasAssumption getter have a setter to manually override. Like this...

            //assumption is 15/08/2024
            var calendar = new GermanPublicHoliday { State = GermanPublicHoliday.States.BY };
            var isHoliday = calendar.IsPublicHoliday(assumption); //true
           //the getter
            var hasAssumption = calendar.HasAssumption; //true
            //override the default - make it false
            calendar.HasAssumption = false;
           //now the calendar does not think assumption is a holiday
            isHoliday = calendar.IsPublicHoliday(assumption); //false

You have to know you are in a catholic or non-catholic region and change it manually - but this would give you the flexibility to do this, and change it dynamically within Bavaria.

Thanks, this would be good enough for us.