GothenburgBitFactory / holidata

Holidata is the core of holidata.net, a no-nonsense, ad-free provider of international holiday data.
https://holidata.net
MIT License
47 stars 13 forks source link

Add locales fr-CA and en-CA #45

Closed ghlecl closed 4 years ago

ghlecl commented 4 years ago

So this is what I have come up with.

I have tried to include as much of the territories and provinces I could find official information for (but I admit I have not taken the time to check every thing, sorry).

I have taken one liberty: I have put both Good Friday and Easter Monday even though the official holiday is often one OR the other, because for a large number of people, it is actually both. Other than that, as discussed, I have not included the observed day because it is left to the employer whether it is the day before or after that the holiday should be observed when the holiday falls on a weekend.

Other than that, I have tested that the code works for the 2020 dates. I admit not having done much more tests then that.

Let me know if you find a problem.

PS: I have added pycache/ in the gitignore. Hope it's alright.

ghlecl commented 4 years ago

I have also changed the code to use list comprehension.

Not being used to such a large "first part" (sorry, English is not my first language and I am not sure how to call it) of the list comprehension, I am not certain the code formatting will be to your liking though.

Do not hesitate to ask for some changes again. :-)

lauft commented 4 years ago

LGTM. I have corrected the present data on holidata.net. As soon as your PR is merged, I will generate and publish the new data. Thanks again for your contribution

What is left to do: