April 9, 2010 11:29PM
I recently updated my component for calculating public holidays and have decided to share the C# source. This is currently configured for South Africa, but can easily be updated to support any other country you choose (see the config file in the unit test project).
The standard holidays are stored in a custom configuration section as month and day, while easter is calculated for the specific year in question. The provider determines if a public holiday falls on a Sunday and rolls it over to the Monday, as per South African standard (this behavior can be disabled in the configuration).
Enjoy. Any feedback would be appreciated.
Imaginary.Holidays.7z (12.70 kb)