So, way back in the day, when I was working at UVic, I was writing a program that let my fellow sysadmins track overtime hours. Of course, you get a different amount of credit if your overtime happens on a holiday, and as I started making up a list of stat holiday dates, I thought to myself (as one often does when programming, especially in Perl): "Surely somebody has solved this problem before. If I'm lucky, they've even put code up on CPAN to solve it for me."
The first might have been true, but the second wasn't. There was a whole hierarchy of Date::Holidays modules, with holidays for Germany, Australia, the UK...but not for Canada.
The challenging part of the module had nothing to do with the code per se; that was (and is) pretty basic. No, the fun came in trying to catalogue all of the holidays we have across 10 provinces, 3 territories, as well as the federal jurisdiction, and trying to determine which of them are "canonical" enough that most people are going to get the day off or pay in lieu. Even now some of the holidays I found out about aren't implemented: f'rinstance, did you know that the day of the Royal St. John's Regatta is a holiday in St. John's, Newfoundland, and if the weather is bad enough to postpone the regatta, the holiday gets postponed too?
Anyway, I'm hoping this'll be a learning experience for me, and looking forward to some feedback. The code needs work and there's a few more features that could stand to be added if anybody ends up making use of the module.
Date::Holidays::CA should show up at CPAN any moment now. Share and enjoy!