martinjw / Holiday

Calculate Public Holidays
MIT License
208 stars 82 forks source link

Update France Holiday and and addition of secondary holidays in other regions #131

Closed tossnet closed 5 months ago

tossnet commented 5 months ago

Add a new method PublicHolidaysComplete returns a IList<Holiday> like SwitzerlandPublicHoliday.

martinjw commented 5 months ago

Build fails - PublicHolidayTests.TestAllPublicHolidays.TestHolidayLists threw exception: System.ArgumentException: An item with the same key has already been added. Key: 5/8/1997 12:00:00 AM

Error at PublicHoliday\FrancePublicHoliday.cs:line 1059

A collision for Ascension with another holiday in 1997?

In existing code there's a check

if (ascension == mayday) ascension = ascension.AddSeconds(1); //ascension can fall on Mayday
martinjw commented 5 months ago

thanks!

martinjw commented 5 months ago

I added/changed some comments on France holidays- eg on Regions it is actually a mix of Regions & collectivities.

I'm a little confused about Regions.OnlyOfficial (not used) and Regions.All. Could the first enum by Regions.All in this case? Enum 0 should always be the default, so surely that's All, not 99?