-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added additional holidays for regions and subdivisions in India (Issue #2182) #2259
base: dev
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #2259 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 199 199
Lines 12134 12183 +49
Branches 1731 1736 +5
=========================================
+ Hits 12134 12183 +49 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ankushhKapoor, good start! Are you planning to add other regional holidays? According to Wiki, there are a lot of them.
@@ -31,45 +31,83 @@ class India(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolida | |||
subdivisions = ( | |||
"AN", # Andaman and Nicobar Islands. | |||
"AP", # Andhra Pradesh. | |||
"AR", # Arunāchal Pradesh. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Offcial ISO3166-2 contains these names in the Indian System of Transliteration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just my 2 cents here but we can probably include both this and ASCII-only version as aliases like what we've implemented for Italy a few months earlier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ankushhKapoor, you can look at example with several aliases for subdiv in Austria.
Thanks! Yep, I’m planning to add more regional holidays. The challenge is that each holiday falls on a different date every year, so I'm thinking of the most efficient approach to handle this. I'll add as many holidays as I can and will also include Hindi translations for each one. |
You can use the same approach as for Diwali, Holi etc. Later, if we implement support for Indian calendar (actually, calendars), it will be possible to refactor this similarly to other lunar calendars. |
Yes, I’m also thinking of doing the same. |
Quality Gate passedIssues Measures |
Proposed change
This PR addresses Issue #2182, enhancing the holiday dataset by incorporating state-specific holidays and regional variations. The goal is to provide a more comprehensive representation of holidays in India, covering a wider range of locations.
I am a Winter of Code (WoC) 2025 contributor and am excited to contribute to the project with these updates. Let me know if any further modifications are needed!
Resolves #2182 .
Type of change
holidays
functionality in general)Checklist
make check
, all checks and tests are green