GothenburgBitFactory / holidata

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

Add Andalusia region (AN) holidays #56

Closed vice closed 4 years ago

vice commented 4 years ago

Some of these holidays could be celebrated in others regions of Spain. At least they are correct for Andalusia region (AN).

lauft commented 4 years ago

Thanks for your contribution! 👍 Can you provide the online sources which define these holidays (official legal documents preferred). This will help to check on updates in the future.

vice commented 4 years ago

I used those references https://administracion.gob.es/pag_Home/atencionCiudadana/calendarios/laboral.html http://www.seg-social.es/wps/portal/wss/internet/CalendarioLaboral https://es.wikipedia.org/wiki/Calendario_laboral (Not official but accurate)

For Andalusia https://www.juntadeandalucia.es/temas/trabajar/relaciones/calendario.html

Also checked https://www.calendarioslaborales.com/ they could be used to check holidays in other Spanish regions and locations but is not an official source and could contain errors.

vice commented 4 years ago

From the first reference (https://administracion.gob.es/pag_Home/atencionCiudadana/calendarios/laboral.html) you can find this legal document https://www.boe.es/diario_boe/txt.php?id=BOE-A-2019-14552 But this is just for 2020. And there is no reference to 2 local holidays because they are decided locally. Holidays in Spain is a mess. See #57 for a suggestion.

vice commented 4 years ago

In Spain is very common to have Monday holidays when a fixed one is on Sunday but it is a regional decision. I added those that Andalusia region had done for many years (2006 - 2020) as far as I have researched. I think generally others regions could be included but they need to be checked one by one.

Maybe is better to assume that the Sunday holiday produced a Monday holiday and make correction when we discover this is not true for any region. I am open to suggestions.

vice commented 4 years ago

I probably will do more addition and correction from official documents. Including for other regions besides Andalusia. I need to change branch name as my first intention was just to add regional holidays as in commit e8c69cea33c0c1f98a8ac25b51c9b312a83f26da.

vice commented 4 years ago

I think I pushed a change in the middle of the checks. I will check logs later. I need to leave.

vice commented 4 years ago

I see, I need to check tests because I changed names and remove some days. I will do later.

lauft commented 4 years ago

I see, I need to check tests because I changed names and remove some days. I will do later.

You most probably will need to update the snapshots by calling

pytest test/test_holidata.py --snapshot-update
vice commented 4 years ago

Thanks for the tip. I'm going to close this pull request a prepare a new one updating code and tests snapshots.