vacanza / python-holidays

Generate and work with holidays in Python
https://pypi.org/project/holidays
MIT License
1.4k stars 447 forks source link

Easter Sunday missing on Brazil, there is an explanation?! #1703

Open gosvnavarro opened 4 months ago

gosvnavarro commented 4 months ago

Hello,

By the beginning of this month (February) I made the correction on the library usage to take the holidays by category (Optional and Public because we were using as the old way), on that occasion the holiday of 'Easter Sunday' ('Páscoa' in Brazilian Portuguese) was being catch as the first image show. However, it came to our attention these past days that the holiday of 'Easter Sunday' disappeared from the holidays calls (as the second image shows).

We try to look into reading the documentation and other issues, however, we didn't find an answer or something that could help. We even tried to use 'subdiv' since we thought it was now categorized as belonging to the states but again nothing. There is a reason why we aren't being able to get the 'Easter Sunday' on Brazil or we are missing something?!

Any help is appreciated. Thank you =).

Image showing the holidays presented on the execution performed on Feb, 6th. image

Image showing the holidays presented on the execution on Feb, 22th. image

arkid15r commented 4 months ago

Hi @gosvnavarro,

I'm a bit confused by the issue description. As per commit history there were no changes for Brazil holidays for couple months. Please provide some code examples and include PH versions you've been using.

@KJhellico anything to add? I'm not really sure if we've ever had Easter holiday for Brazil.

KJhellico commented 4 months ago

We had Easter Sunday ("Páscoa") in Brazil until v0.25 (May 15, 2023). It was removed in the update, as this holiday is absent in official sources or other authoritative sources (Wiki, Time and Date, Official Holidays).

@gosvnavarro, if you have any sources confirming the status of this holiday, please share them with us.

gosvnavarro commented 4 months ago

Sorry for the late reply and thanks for answering @arkid15r and @KJhellico.

(1.1) In both times the following line of code were used. This command stayed inside a function that collected the holidays from the library and added a couple more that aren't official (or aren't on the references) but are important in Brazil (I can see if I can share the whole code). df = pd.DataFrame(holidays.Brazil(years = [i for i in valid_years], categories = ('optional', 'public')).items(), columns=['ds', 'holiday'])

(1.2) When we updated the code (and got the Easter), the version available was 0.42 so when the newer version got released and we stopped seeing the Easter holiday was first hypothesis was the library. After showing your answers to my colleague and discussing it, we feel that the act of seeing the holiday is related to be on was the cache of our cluster and that got reflected to us since we were using, because now we know that Easter never existed in first place.

(2) I totally understand and I can definitely share sources if I find something official.

Again, thanks for your time =).