Open goncaloperes opened 4 years ago
Additional Notes: • The state has been giving "Entrudo" since 1978, but there were some exceptions: 1993 and 2012–2015. • Corpus Cristus and Implantação da República were suspended between 2013 and 2015 (inclusive).
I may suggest adding the 18 district holidays: Aveiro, Beja, Braga, Bragança, Castelo Branco, Coimbra, Évora, Faro, Guarda, Leiria, Lisboa, Portalegre, Porto, Santarém, Setúbal, Viana do Castelo, Vila Real e Viseu. I can create a PR with this addition if you agree @dr-prodigy
To get more granular, we would need to add the 318 municipal holidays ... that would take considerably more time to implement.
@Nalguedo it sounds like a good plan.. I definitely agree on it! If you wish to implement this first version, please do and I'll be happy to include it.. then there's always time to improve and proceed with the other 300 :-) Thank you very much!
@dr-prodigy This is now solved with the latest release.
Not sure if we want to keep it open to track progress on adding those ~300 holidays mentioned by @goncaloperes and @pmpbaptista
It makes sense to keep it open ;)
I was about to open an issue about Municipal Holidays, a full list is missing in english wikipedia but can be found in the portuguese page https://pt.wikipedia.org/wiki/Feriados_em_Portugal
I can work on this and send a PR, but I am not sure how to go about it. Currently the code allows the regions defined in https://en.wikipedia.org/wiki/ISO_3166-2:PT
How would I add the municipalities under the subdivisions? Once this is clear I can implement the dates from the wiki page linked above
Hi @JarbasAl, Thanks for your willingness to help with this!
Currently, holidays code does not natively support handling of parent subdivisions. The subdivisions list is flat so you would need to add municipalities subdivisions just on the same level as the current once.
What's really complicated is the fact that ISO 3166 knows nothing about Portugal subdivisions besides what we already have.
As the next holidays
version (v1) is going to reflect ISO 3166 classification this might be a problem. I guess we could have something like extras
module for such cases.
So you have a couple of options here:
v1
is released (ETA 2025) and start working on the code after thatv0
version w/o waiting for built-in parent subdivision supportv0
(invoking parent subdivision methods manually) and v1
when it supports multi-level subdivisionsYou can find current v1 code for PT here.
I did some searching and found that we have 3-letter codes, perhaps these could be used as identifiers?
https://pt.wikipedia.org/wiki/C%C3%B3digo_municipal
I gathered them in csv format here https://gist.github.com/JarbasAl/00ac648935e964a795e9b9fe4585c2a5
source: https://files.dre.pt/1s/1998/07/161a00/33893408.pdf (page 16)
there is also the NUTS codes, but those are not granular enough, posting for reference only
https://pt.wikipedia.org/wiki/NUTS_de_Portugal https://pt.wikipedia.org/wiki/Lista_de_munic%C3%ADpios_de_Portugal_por_NUTS,_distritos_e_ilhas
I've tasked AI to do some work in this direction but not sure about the quality of the result as some of them aren't unique.
You CSV looks like something we could work with.
I can only suggest adding the parent subdivision column for each entry. We'll eventually need a mapping of subdivisions and their parents.
Even though in Portugal there are nationwide holidays, others are regional or municipal (depending on the city).
If one runs the following script, to access the holidays in Portugal plus extended days most people have off:
One gets the following list:
I have seen that the general/national holidays for Portugal are missing, here is its list:
As one can see, it is slightly different than the one above, as the first one considers some municipal holidays. Here is a detailed list of the holidays in Portugal, in their specific months.