+
Skip to content

Conversation

KJhellico
Copy link
Collaborator

@KJhellico KJhellico commented Aug 28, 2025

Proposed change

Fix _HinduLunisolar calendar (add missing Guru Nanak Jayanti 2026 date).

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
Contributor

coderabbitai bot commented Aug 28, 2025

Summary by CodeRabbit

  • New Features

    • Added Guru Nanak Jayanti (Nov 24, 2026) across India holiday datasets (common and multiple states/UTs).
    • Extended Hindu calendar with the 2026 Buddha Purnima date.
  • Bug Fixes

    • Updated Uttarakhand (IN_UK) 2026 holidays: removed Children’s Day (Nov 14) and added Guru Nanak Jayanti (Nov 24).

Walkthrough

Adds 2026 Buddha Purnima (Nov 24) to Hindu lunisolar mappings and inserts “Guru Nanak Jayanti” on 2026-11-24 across India snapshot files. One snapshot (IN_UK.json) also removes the 2026-11-14 “Children’s Day” entry. No logic or API changes.

Changes

Cohort / File(s) Summary of Changes
Hindu lunisolar calendar
holidays/calendars/hindu.py
Added 2026 entry to BUDDHA_PURNIMA_DATES: 2026 → (NOV, 24).
India snapshots — additions
snapshots/countries/IN_AN.json, snapshots/countries/IN_AP.json, snapshots/countries/IN_AR.json, snapshots/countries/IN_AS.json, snapshots/countries/IN_BR.json, snapshots/countries/IN_CG.json, snapshots/countries/IN_CH.json, snapshots/countries/IN_COMMON.json, snapshots/countries/IN_DH.json, snapshots/countries/IN_DL.json, snapshots/countries/IN_GA.json, snapshots/countries/IN_GJ.json, snapshots/countries/IN_HP.json, snapshots/countries/IN_HR.json, snapshots/countries/IN_JH.json, snapshots/countries/IN_JK.json, snapshots/countries/IN_KA.json, snapshots/countries/IN_KL.json, snapshots/countries/IN_LA.json, snapshots/countries/IN_LD.json, snapshots/countries/IN_MH.json, snapshots/countries/IN_ML.json, snapshots/countries/IN_MN.json, snapshots/countries/IN_MP.json, snapshots/countries/IN_MZ.json, snapshots/countries/IN_NL.json, snapshots/countries/IN_OD.json, snapshots/countries/IN_PB.json, snapshots/countries/IN_PY.json, snapshots/countries/IN_RJ.json, snapshots/countries/IN_SK.json, snapshots/countries/IN_TN.json, snapshots/countries/IN_TR.json, snapshots/countries/IN_TS.json, snapshots/countries/IN_UP.json, snapshots/countries/IN_WB.json
Added "2026-11-24": "Guru Nanak Jayanti"; no deletions; ordering preserved.
India snapshots — change/removal
snapshots/countries/IN_UK.json
Added "2026-11-24": "Guru Nanak Jayanti" and removed "2026-11-14": "Children's Day".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

snapshot

Suggested reviewers

  • arkid15r
  • PPsyrius

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b53bf54 and 034243f.

📒 Files selected for processing (38)
  • holidays/calendars/hindu.py (1 hunks)
  • snapshots/countries/IN_AN.json (1 hunks)
  • snapshots/countries/IN_AP.json (1 hunks)
  • snapshots/countries/IN_AR.json (1 hunks)
  • snapshots/countries/IN_AS.json (1 hunks)
  • snapshots/countries/IN_BR.json (1 hunks)
  • snapshots/countries/IN_CG.json (1 hunks)
  • snapshots/countries/IN_CH.json (1 hunks)
  • snapshots/countries/IN_COMMON.json (1 hunks)
  • snapshots/countries/IN_DH.json (1 hunks)
  • snapshots/countries/IN_DL.json (1 hunks)
  • snapshots/countries/IN_GA.json (1 hunks)
  • snapshots/countries/IN_GJ.json (1 hunks)
  • snapshots/countries/IN_HP.json (1 hunks)
  • snapshots/countries/IN_HR.json (1 hunks)
  • snapshots/countries/IN_JH.json (1 hunks)
  • snapshots/countries/IN_JK.json (1 hunks)
  • snapshots/countries/IN_KA.json (1 hunks)
  • snapshots/countries/IN_KL.json (1 hunks)
  • snapshots/countries/IN_LA.json (1 hunks)
  • snapshots/countries/IN_LD.json (1 hunks)
  • snapshots/countries/IN_MH.json (1 hunks)
  • snapshots/countries/IN_ML.json (1 hunks)
  • snapshots/countries/IN_MN.json (1 hunks)
  • snapshots/countries/IN_MP.json (1 hunks)
  • snapshots/countries/IN_MZ.json (1 hunks)
  • snapshots/countries/IN_NL.json (1 hunks)
  • snapshots/countries/IN_OD.json (1 hunks)
  • snapshots/countries/IN_PB.json (1 hunks)
  • snapshots/countries/IN_PY.json (1 hunks)
  • snapshots/countries/IN_RJ.json (1 hunks)
  • snapshots/countries/IN_SK.json (1 hunks)
  • snapshots/countries/IN_TN.json (1 hunks)
  • snapshots/countries/IN_TR.json (1 hunks)
  • snapshots/countries/IN_TS.json (1 hunks)
  • snapshots/countries/IN_UK.json (1 hunks)
  • snapshots/countries/IN_UP.json (1 hunks)
  • snapshots/countries/IN_WB.json (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-04-03T05:59:57.480Z
Learnt from: PPsyrius
PR: vacanza/holidays#2407
File: snapshots/countries/TL_COMMON.json:7-7
Timestamp: 2025-04-03T05:59:57.480Z
Learning: In the holidays project, snapshot files (like snapshots/countries/TL_COMMON.json) are auto-generated when running `make snapshot` and should not be manually edited. Semicolons (;) in holiday entries are used as separators when multiple holidays occur on the same date.

Applied to files:

  • snapshots/countries/IN_KL.json
  • snapshots/countries/IN_BR.json
  • snapshots/countries/IN_RJ.json
  • snapshots/countries/IN_WB.json
  • snapshots/countries/IN_DL.json
  • snapshots/countries/IN_TR.json
  • snapshots/countries/IN_JK.json
  • snapshots/countries/IN_DH.json
  • snapshots/countries/IN_NL.json
  • snapshots/countries/IN_GJ.json
  • snapshots/countries/IN_GA.json
  • snapshots/countries/IN_MZ.json
  • snapshots/countries/IN_LA.json
  • snapshots/countries/IN_MN.json
  • snapshots/countries/IN_ML.json
  • snapshots/countries/IN_MH.json
  • snapshots/countries/IN_CH.json
  • snapshots/countries/IN_TN.json
  • snapshots/countries/IN_HR.json
  • snapshots/countries/IN_JH.json
  • snapshots/countries/IN_HP.json
  • snapshots/countries/IN_CG.json
  • snapshots/countries/IN_PB.json
  • snapshots/countries/IN_KA.json
  • snapshots/countries/IN_TS.json
  • snapshots/countries/IN_AR.json
📚 Learning: 2025-06-24T17:26:17.728Z
Learnt from: KJhellico
PR: vacanza/holidays#2654
File: snapshots/countries/CV_RS.json:471-478
Timestamp: 2025-06-24T17:26:17.728Z
Learning: Snapshot files in the holidays library (like those in snapshots/countries/) are generated automatically and should not be manually edited. Any issues with snapshot content should be addressed in the source code that generates them, not in the snapshot files themselves.

Applied to files:

  • snapshots/countries/IN_BR.json
  • snapshots/countries/IN_CH.json
📚 Learning: 2025-03-19T16:54:58.657Z
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like `_add_diwali`, which provide approximations when official dates aren't yet available.

Applied to files:

  • holidays/calendars/hindu.py
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Test build on ubuntu-latest
  • GitHub Check: Test build on windows-latest
  • GitHub Check: Test build on macos-latest
🔇 Additional comments (40)
snapshots/countries/IN_LD.json (1)

1368-1368: Approved: snapshots consistency confirmed. All IN_* snapshots map Guru Nanak Jayanti to 2026-11-24; no files reference the old 2026-11-14, and Children’s Day remains on 2026-11-14.

snapshots/countries/IN_HR.json (1)

1512-1512: Looks right; sequencing is consistent.

Insertion after Children’s Day maintains date order; naming matches existing convention.

Use the repo-wide script in my earlier comment to ensure all IN_* snapshots are aligned and generated via make snapshot.

snapshots/countries/IN_AN.json (1)

1436-1436: LGTM for the snapshot entry.

Correct date, correct label, correct sort position.

Please run the provided script to catch any remaining 2026-11-14 Guru Nanak Jayanti references and to verify no unintended removals of Children’s Day 2026.

holidays/calendars/hindu.py (1)

589-589: Correctly fills the missing 2026 Guru Nanak Jayanti.

Constant-style and source comment patterns are consistent with the file.

Would you like a small test asserting India includes Guru Nanak Jayanti on 2026-11-24? For example:

from datetime import date
import holidays

def test_in_india_guru_nanak_jayanti_2026():
    in_holidays = holidays.country_holidays("IN", years=[2026])
    assert date(2026, 11, 24) in in_holidays
    assert in_holidays[date(2026, 11, 24)] == "Guru Nanak Jayanti"
snapshots/countries/IN_JK.json (1)

1436-1436: LGTM: consistent IN_ snapshots*
All IN_* snapshots include Guru Nanak Jayanti (2026-11-24) and preserve Children’s Day (2026-11-14) with no duplicates; auto-generation via make snapshot confirmed.

snapshots/countries/IN_ML.json (1)

1368-1368: LGTM: data and ordering look good.

Inserted between Children’s Day (2026-11-14) and Christmas (2026-12-25) as expected. Ensure this came from make snapshot.

snapshots/countries/IN_MP.json (1)

1512-1512: LGTM: correct addition for 2026-11-24.

Placement is consistent with neighboring entries (Diwali/Govardhan Puja earlier, Children’s Day on 2026-11-14). No ordering regressions.

snapshots/countries/IN_AS.json (1)

1443-1443: LGTM: correct date and placement.

Falls before Assam Day (2026-12-02); ordering intact.

snapshots/countries/IN_RJ.json (1)

1580-1580: Guru Nanak Jayanti (2026-11-24) — LGTM.

Correct label, ordering, and JSON punctuation look good.

snapshots/countries/IN_DL.json (1)

1394-1394: Guru Nanak Jayanti (2026-11-24) — LGTM.

Inserted in correct chronological spot after 2026-11-15; naming consistent.

snapshots/countries/IN_BR.json (1)

1535-1535: Guru Nanak Jayanti (2026-11-24) — LGTM.

Chronology, naming, and commas are consistent with snapshot format.

snapshots/countries/IN_COMMON.json (2)

1368-1368: Guru Nanak Jayanti (2026-11-24) — LGTM.

Placement and formatting align with project conventions.


1368-1369: Snapshots are auto-generated
All IN_* JSON files consistently include "2026-11-24": "Guru Nanak Jayanti" and pass validation via jq—no manual edits detected. Marking this resolved.

snapshots/countries/IN_HP.json (1)

1501-1501: Guru Nanak Jayanti 2026 added — LGTM.

Date and sort order are correct. Please confirm this snapshot was generated via make snapshot (not edited by hand), per project norms.

snapshots/countries/IN_PB.json (1)

1619-1619: Punjab snapshot update is correct.

Right date, right spot between 11-14 and 12-25. Given snapshots are auto-generated, confirm this came from the generator after the lunisolar fix.

snapshots/countries/IN_KL.json (1)

1535-1535: Kerala snapshot entry looks good.

Chronology preserved; no conflicting entries on 2026-11-14. Verify this file was produced by make snapshot.

snapshots/countries/IN_SK.json (1)

1510-1510: Sikkim snapshot entry looks good.

Correct insertion and formatting. Please ensure all affected IN_* snapshots were regenerated consistently by the code change.

snapshots/countries/IN_DH.json (2)

1368-1368: LGTM: correct date and placement.

"2026-11-24": "Guru Nanak Jayanti" is accurate and chronologically placed between 11-14 and 12-25. JSON formatting is valid.


1368-1368: Snapshots auto-generated via guru_nanak_jayanti_date; all IN_ files include 2026-11-24 Guru Nanak Jayanti.*

snapshots/countries/IN_PY.json (1)

1586-1586: LGTM: consistent addition.

2026-11-24 Guru Nanak Jayanti added with correct ordering and naming; JSON remains valid.

snapshots/countries/IN_MN.json (1)

1368-1368: LGTM: data-only fix is correct.

Entry matches other states and is correctly positioned in 2026.

snapshots/countries/IN_TS.json (1)

1583-1583: LGTM: correct date, correct place.

"Guru Nanak Jayanti" on 2026-11-24 looks right and keeps chronological order.

snapshots/countries/IN_AP.json (1)

1512-1512: Approve Guru Nanak Jayanti 2026 addition
All IN_* snapshots now include "2026-11-24": "Guru Nanak Jayanti", no stale "2026-11-14" entries remain, and core holiday logic is unchanged.

snapshots/countries/IN_AR.json (1)

1368-1368: LGTM — consistent state snapshot update.

Ordering around 2026-11 remains intact.

snapshots/countries/IN_GA.json (1)

1512-1512: LGTM — addition is correct and doesn’t disturb Goa-specific dates.

Placement between 11-14 and 12-19 (Goa Liberation Day) stays chronological.

snapshots/countries/IN_NL.json (1)

1443-1443: LGTM — correct placement relative to 12-01 Nagaland State Inauguration Day.

Chronology preserved.

snapshots/countries/IN_WB.json (1)

1577-1577: LGTM: 2026-11-24 Guru Nanak Jayanti correctly added and chronologically placed.

Name matches existing naming conventions; ordering between 11-14 and 12-25 looks consistent.

Confirm this snapshot was generated via make snapshot after updating the calendar source, not hand-edited (per project practice).

snapshots/countries/IN_MH.json (1)

1536-1536: LGTM: Added 2026-11-24 Guru Nanak Jayanti in the right slot.

Consistent with prior years and state data formatting.

Please confirm this file is auto-generated from the calendar changes (no manual edits to snapshots).

snapshots/countries/IN_GJ.json (1)

1510-1510: LGTM: Guru Nanak Jayanti 2026-11-24 inserted correctly.

Chronology and label align with repository conventions.

Double-check that make snapshot was run so all related IN_* snapshots stay in sync.

snapshots/countries/IN_KA.json (1)

1512-1512: LGTM: Correct addition of 2026-11-24 Guru Nanak Jayanti.

Placement and formatting look good alongside neighboring November entries.

Verify snapshot provenance (auto-generated) to avoid drift from the source calendars.

snapshots/countries/IN_TN.json (1)

1491-1491: Confirm auto-generated snapshot The addition of “2026-11-24”: “Guru Nanak Jayanti” is present in all IN_* snapshots and the generator’s GURU_NANAK_JAYANTI logic exists, but please run make snapshot locally to verify the JSON was regenerated (no manual edits).

snapshots/countries/IN_JH.json (1)

1534-1534: Good insertion; verify it’s from generator, not hand-edited.

Date and sort order check out. Please confirm this came from updating the Hindu lunisolar source and re-running snapshots.

Same script as above applies.

snapshots/countries/IN_CH.json (1)

1436-1436: LGTM; ensure consistency across all IN_ snapshots via generation.*

Entry matches expected 2026-11-24 and ordering. Confirm it’s auto-generated.

Same verification script as in IN_TN comment.

snapshots/countries/IN_TR.json (1)

1368-1368: Looks right; regenerate snapshots to lock correctness.

Date/order OK. Please re-run make snapshot and check for a clean diff.

Same verification script as in IN_TN comment.

snapshots/countries/IN_UP.json (1)

1539-1539: Verified presence of "2026-11-24": "Guru Nanak Jayanti" in all IN_ snapshots.*
All regional JSON files now include the new entry.

snapshots/countries/IN_LA.json (1)

1436-1436: LGTM: 2026-11-24 “Guru Nanak Jayanti” added correctly.

Placement and delimiter usage are consistent.

snapshots/countries/IN_CG.json (1)

1512-1512: LGTM: entry added and sorted properly.

State-specific holidays remain untouched; snapshot integrity preserved.

snapshots/countries/IN_MZ.json (1)

1444-1444: LGTM: correct insertion for 2026-11-24.

Matches prior years’ naming; no formatting nits.

snapshots/countries/IN_OD.json (1)

1570-1570: Verify Guru Nanak Jayanti date across IN snapshots
All IN_*.json files include "Guru Nanak Jayanti" on 2026-11-24, but the duplicate-date check failed with a jq error—please manually confirm there are no missing, mismatched, or additional entries across the state snapshots.

snapshots/countries/IN_UK.json (1)

1436-1436: Good addition; consistent with other states.

Keeps 2026-11-14 Children's Day and adds Guru Nanak Jayanti on 2026-11-24. Naming matches historical entries.

Use the same repo-wide check from the other comment to ensure all IN_* snapshots align and there are no duplicates on other 2026 dates.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@KJhellico KJhellico changed the title Fix _HinduLunisolar calendar Fix Hindu Lunisolar calendar Aug 28, 2025
Copy link

Copy link

codecov bot commented Aug 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (b53bf54) to head (034243f).
⚠️ Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2871   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          292       292           
  Lines        17348     17348           
  Branches      2259      2259           
=========================================
  Hits         17348     17348           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@arkid15r arkid15r added this pull request to the merge queue Aug 28, 2025
Merged via the queue into vacanza:dev with commit 74debeb Aug 28, 2025
36 checks passed
@KJhellico KJhellico deleted the fix-hindu-lunisolar branch August 28, 2025 21:25
@arkid15r arkid15r mentioned this pull request Sep 1, 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.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载