python-holidays icon indicating copy to clipboard operation
python-holidays copied to clipboard

Update India holidays: add Arunachal Pradesh (AR) holidays

Open Shweta-Singh30 opened this issue 8 months ago โ€ข 23 comments

Proposed change

Add Arunachal Pradesh (AR) subdivision public holidays support.

  • Adds _populate_subdiv_ar_public_holidays() function
  • Arunachal Pradesh Statehood Day on February 20 (from year 1987)
  • Dr. B. R. Ambedkar Jayanti on April 14

References:

  • https://en.wikipedia.org/wiki/Arunachal_Pradesh
  • https://en.wikipedia.org/wiki/Arunachal_Pradesh_Statehood_Day

Type of change

  • [x] Supported country/market holidays update (calendar discrepancy fix, localization)

Checklist

  • [x] I've read and followed the contributing guidelines.
  • [x] I've run make check locally; all checks and tests passed.

Shweta-Singh30 avatar Mar 22 '26 18:03 Shweta-Singh30

[!NOTE]

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • [ ] โ–ถ๏ธ Resume reviews
  • [ ] ๐Ÿ” Trigger review

Walkthrough

Adds an Arunachal Pradesh subdivision method to India that registers four state-specific holidays (Arunachal Pradesh Statehood Day Feb 20 from 1987, Bohag Bihu Apr 15, Dr. B. R. Ambedkar's Jayanti Apr 14, Indigenous Faith Day Dec 1) and updates tests and localized labels.

Changes

Cohort / File(s) Summary
Arunachal Pradesh holidays
holidays/countries/india.py
Added _populate_subdiv_ar_public_holidays to add AR-specific holidays: Feb 20 (statehood, from 1987), Apr 14 (Ambedkar Jayanti), Apr 15 (Bohag Bihu), Dec 1 (Indigenous Faith Day).
Tests updated
tests/countries/test_india.py
Added test_ar_statehood_day, extended 2018 subdivision holiday mapping to include "AR" dates, and updated localized expected labels to include the new AR holiday names/combined labels.

Estimated code review effort

๐ŸŽฏ 2 (Simple) | โฑ๏ธ ~10 minutes

Possibly related PRs

  • vacanza/holidays#2259: Overlapping India subdivision updates and tests touching holidays/countries/india.py and tests/countries/test_india.py.
  • vacanza/holidays#2953: Adds per-state/subdivision holiday population methods to the India class (same pattern as this change).

Suggested labels

l10n

Suggested reviewers

  • KJhellico
  • PPsyrius
  • arkid15r
๐Ÿšฅ Pre-merge checks | โœ… 2 | โŒ 1

โŒ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage โš ๏ธ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
โœ… Passed checks (2 passed)
Check name Status Explanation
Title check โœ… Passed The title directly and clearly describes the main change: adding Arunachal Pradesh holidays to India's holiday calendar.
Description check โœ… Passed The description is related to the changeset, covering the new function, specific holidays added, and references. It accurately describes what was implemented.

โœ๏ธ Tip: You can configure your own custom pre-merge checks in the settings.

โœจ Finishing Touches
๐Ÿงช Generate unit tests (beta)
  • [ ] Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

โค๏ธ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Mar 22 '26 18:03 coderabbitai[bot]

As I can see, Arunachal Pradesh has also other Gazetted holidays?

KJhellico avatar Mar 22 '26 20:03 KJhellico

As I can see, Arunachal Pradesh has also other Gazetted holidays?

Yes, you're right! Arunachal Pradesh has additional state-specific Gazetted holidays. I am updating the PR to include:

  • Bohag Bihu (April 15)
  • Indigenous Faith Day (December 1)

Reference: https://www.northeastjob.in/2025/04/arunachal-pradesh-holiday-list.html

Shweta-Singh30 avatar Mar 23 '26 05:03 Shweta-Singh30

Hi @PPsyrius @KJhellico,

I have updated the PR with the following changes:

  1. Added more state-specific Gazetted holidays:
    • Bohag Bihu (April 15)
    • Indigenous Faith Day (December 1)
  2. Added references in the reference section of india.py
  3. Added unit tests in test_india.py

Please review when you get a chance. Thank you!

Shweta-Singh30 avatar Mar 23 '26 05:03 Shweta-Singh30

Hi @PPsyrius @KJhellico,

I have addressed all the CodeRabbit suggestions:

  1. Added AR entry in subdiv_holidays_mapping in test_india.py
  2. Added dedicated test for Statehood Day 1987 boundary (test_ar_statehood_day)

Please review when you get a chance. Thank you!

Shweta-Singh30 avatar Mar 23 '26 05:03 Shweta-Singh30

@Shweta-Singh30 It seems there might be a pre-commit issue. You can try running pre-commit locally to see what needs fixing.

Devika9705 avatar Mar 23 '26 14:03 Devika9705

@Shweta-Singh30,

General recommendations:

  1. It's highly recommended to run local checks (make pre-commit, make test) or enable the corresponding pre-commit hooks. The simplest way to fully set up your development environment is:
make setup
  1. If code changes involve adding or modifying translatable strings (holiday names), you need to run make l10n to update .po files.

This PR notes:

  1. Bohag Bihu (Assamese New Year) is Indian Solar calendar holiday, and in the Gregorian calendar, its date is not fixed but varies by one day.
  2. After updating .po files, you will need to add translations of new names in all supported languages.

KJhellico avatar Mar 23 '26 17:03 KJhellico

@Shweta-Singh30,

General recommendations:

  1. It's highly recommended to run local checks (make pre-commit, make test) or enable the corresponding pre-commit hooks. The simplest way to fully set up your development environment is:
make setup
  1. If code changes involve adding or modifying translatable strings (holiday names), you need to run make l10n to update .po files.

This PR notes:

  1. Bohag Bihu (Assamese New Year) is Indian Solar calendar holiday, and in the Gregorian calendar, its date is not fixed but varies by one day.
  2. After updating .po files, you will need to add translations of new names in all supported languages.

Thank you for the detailed feedback!

Pre-commit checks are now passing locally.

Regarding Bohag Bihu - I understand it follows the Indian Solar calendar. Could you guide me on which method to use for this holiday? I want to make sure I implement it correctly.

Also, I will work on updating the .po translation files.

Shweta-Singh30 avatar Mar 24 '26 04:03 Shweta-Singh30

Could you guide me on which method to use for this holiday?

I recommend using the approach currently employed for other similar holidays (Makar Sankranti, Pongal, Vaisakhi) in the HinduCalendarHolidays and _HinduLunisolar classes. In the future, I hope we will be able to implement more comprehensive support for Indian Solar and Lunisolar calendars.

KJhellico avatar Mar 24 '26 14:03 KJhellico

Could you guide me on which method to use for this holiday?

I recommend using the approach currently employed for other similar holidays (Makar Sankranti, Pongal, Vaisakhi) in the HinduCalendarHolidays and _HinduLunisolar classes. In the future, I hope we will be able to implement more comprehensive support for Indian Solar and Lunisolar calendars.

Thank you for the guidance on Bohag Bihu!

I've updated the implementation to use _add_bohag_bihu() in HinduCalendarHolidays, following the same approach as Makar Sankranti, Pongal, and Vaisakhi โ€” using vaisakhi_date() from _HinduLunisolar for dynamic date calculation.

I've also updated all 6 supported .po translation files (en_IN, en_US, gu, hi, ta, te) with translations for the new holiday names.

Please let me know if any further changes are needed!

Shweta-Singh30 avatar Mar 24 '26 17:03 Shweta-Singh30

You need to revert unneeded .gitignore changes in your branch.

KJhellico avatar Mar 24 '26 18:03 KJhellico

Hi @KJhellico @PPsyrius,

All review comments have been addressed:

  • Added blank lines after Bohag Bihu and Ambedkar Jayanti entries
  • Added en_US translations for all new holiday strings

Please review when you get a chance. Thank you!

Shweta-Singh30 avatar Mar 24 '26 19:03 Shweta-Singh30

  1. It's highly recommended to run local checks (make pre-commit, make test) or enable the corresponding pre-commit hooks.

โ—

KJhellico avatar Mar 25 '26 08:03 KJhellico

  1. It's highly recommended to run local checks (make pre-commit, make test) or enable the corresponding pre-commit hooks.

โ—

Pre-commit checks are passing locally. All checks passed successfully.

Shweta-Singh30 avatar Mar 25 '26 17:03 Shweta-Singh30

You need to add translations in the recently added languages.

KJhellico avatar Mar 27 '26 11:03 KJhellico

You need to add translations in the recently added languages.

Translations have been added for all supported languages (en_IN, en_US, hi, gu, ta, te) for the new holiday names:

  • Arunachal Pradesh Statehood Day
  • Bohag Bihu
  • Indigenous Faith Day

Shweta-Singh30 avatar Mar 28 '26 09:03 Shweta-Singh30

@Shweta-Singh30, you missed Bengali and Kannada. And you need to update test_l10n_... for all languages.

KJhellico avatar Mar 28 '26 15:03 KJhellico

I was trying to update and complete this PR earlier, but _add_bohag_bihu method, which claims that it fell exactly on the same day as Vaisakhi, isn't working out at the moment (our test suite assume it falls on APR, 15 in 2018 - while the generate one is supposedly on APR, 14 that year)

I rechecked online sources to be sure and even Hindustan Times and Indian Express claims didn't agree with each other, so I'm not sure which source to trust anymore - older Arunchal Pradesh's own govenment website record pre-2024 isn't accessible either.

PPsyrius avatar Apr 09 '26 12:04 PPsyrius

I was trying to update and complete this PR earlier, but _add_bohag_bihu method, which claims that it fell exactly on the same day as Vaisakhi, isn't working out at the moment (our test suite assume it falls on APR, 15 in 2018 - while the generate one is supposedly on APR, 14 that year)

I rechecked online sources to be sure and even Hindustan Times and Indian Express claims didn't agree with each other, so I'm not sure which source to trust anymore - older Arunchal Pradesh's own govenment website record pre-2024 isn't accessible either.

@PPsyrius sir , the main difference is just the length of the holiday. Assam gets a three-day public holiday starting on April 14th, while Arunachal Pradesh only gets a single day off strictly on the main New Year date itself, which was April 15th in 2018. Also, both of those articles you checked are almost certainly referring to Assam's multi-day holiday schedule rather than Arunachal Pradesh's specific single day.

Here are a few sources that might be helpful to confirm the date:

https://timesofindia.indiatimes.com/city/guwahati/bank-holidays-in-arunachal-pradesh-2018/articleshow/63484334.cms

https://www.calendarlabs.com/bank-holidays-in-arunachal-pradesh-2018/

https://cdnbbsr.s3waas.gov.in/s3ec058baca01b732cf56f7ce83df21651/uploads/2023/11/2023111872.pdf

pareshjoshij avatar Apr 09 '26 14:04 pareshjoshij