martinjw / Holiday

Calculate Public Holidays

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dates that aren't public holidays in DenmarkPublicHoliday

msboeg opened this issue · comments

Hello!

I've recently been looking into using this package for determining bank closing days in Scandinavia, but noticed that Denmark is wrong.
Constitution Day and Labour Day are not public holidays in Denmark, but are days off as part of agreement between unions and employers - and very often mutually exclusive.

I would personally remove both days from the class, but this isn't backwards compatible, so I'd like to know how you'd like this change to be made, before I start implementing it (or if you'll do it yourself).

Thanks 😊

Maybe a boolean property or properties- IncludeConstitutionDay? And/or a boolean passed into a non-default constructor? (and a default constructor will include the dates, for compatibility)

In some countries some holidays are regional, and we pass in the region into the constructor, with HasHoliday() properties used with this. It's not quite the same pattern - I imagine it's sector/company specific, but it's similar.