Skip to content
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

Open
wants to merge 24 commits into
base: dev
Choose a base branch
from

Conversation

ankushhKapoor
Copy link

@ankushhKapoor ankushhKapoor commented Jan 31, 2025

Proposed change

  • Extended the holiday list for multiple regions in India.
  • Added holidays for various subdivisions and states, ensuring better coverage.
  • Updated documentation to include the new subdivisions/states and their respective holidays.

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

  • New country/market holidays support (thank you!)
  • Supported country/market holidays update (calendar discrepancy fix, localization)
  • Existing code/documentation/test/process quality improvement (best practice, cleanup, refactoring, optimization)
  • Dependency update (version deprecation/pin/upgrade)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (a code change causing existing functionality to break)
  • New feature (new holidays functionality in general)

Checklist

Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (987ca01) to head (135e6d9).
Report is 6 commits behind head on dev.

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.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@KJhellico KJhellico left a 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.
Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Collaborator

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.

@ankushhKapoor
Copy link
Author

@ankushhKapoor, good start! Are you planning to add other regional holidays? According to Wiki, there are a lot of them.

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.

@KJhellico
Copy link
Collaborator

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.

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.

@ankushhKapoor
Copy link
Author

ankushhKapoor commented Feb 2, 2025

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.

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.

Copy link

sonarqubecloud bot commented Feb 4, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve IN holidays
3 participants