pcraig3/hols

Adding Alberta Optional General Holidays.

crschroder opened this issue · 6 comments

Would it be possible to add the following 3 Alberta Optional General holidays as non federal holidays
Easter Monday,
Heritage Day (First Monday in August)
Boxing Day.

https://www.alberta.ca/alberta-general-holidays.aspx#jumplinks-2

Hi there,

I don't have a notion of "optional" holidays in the API, although I know some provinces list them (not all do, but Alberta's page is pretty good). I know there are other types of holidays, eg "shops closting days" vs "optional" holidays, but once upon a time a laywer reached out to me to say that I should never include non-legislative holidays.

Are you thinking for the API or for the UI?

I can tell you that I don't know of anyone in the province who doesn't treat Heritage Day as an obligatory holiday, regardless of what the alberta website says. Boxing day is common but not given off for everyone, easter monday essentially only government services get it off.

Just to expand on this a bit, it would be great to have these iffy "cultural holidays" included in the API, off by default, but then allow each individual holiday to be forced on or off by region via some parameter in the API call. In my case I'd like to use your API to programmatically determine holidays for several offices across canada, and our company holiday schedule matches your stat day-based one with some exceptions in Alberta and Quebec. So I'd like to include Heritage Day in Alberta, others might want to include Boxing Day and exclude Remembrance Day. In our case we will be using this API for software to know when to expect employees to not book time because of scheduled holidays.

An alternative is to use our own lookup table, but hey who doesn't love a good API source. :)

Hello @GregPeden and @crschroder, can you both have a look at my PR to add optional holidays to the API and leave a comment? Planning to merge it in a few days.

#113

Closing this issue as #113 resolves the original request.

I apologize for getting to this late. Your request came in ON THE DAY I was moving between homes. :)

As a test this works well. As a long-term reach goal if you are so inclined, I'd suggest you include a broader set of holidays or cultural events each with their own ID some default setting for "included" for each one, then separately a way to define in the API call which events to include or exclude by ID number. Basically you can avoid catering to every contingency by allowing the end-user to define their own consumption requirements. I expect most users consume the API for the purpose of obtaining the dates associated with events each year.