Skip to content

Update United States holidays: add Good Friday, Christmas Eve, New Year's Eve to UNOFFICIAL category#3324

Open
PPsyrius wants to merge 5 commits intovacanza:devfrom
PPsyrius:US_unofficial
Open

Update United States holidays: add Good Friday, Christmas Eve, New Year's Eve to UNOFFICIAL category#3324
PPsyrius wants to merge 5 commits intovacanza:devfrom
PPsyrius:US_unofficial

Conversation

@PPsyrius
Copy link
Collaborator

Proposed change

  • Add "Good Friday", "Christmas Eve", "New Year's Eve" to the United States UNOFFICIAL category holidays list.
  • Refactor for United States holidays test cases and their dependencies/territories.

Resolves #3323 .

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: db413dc1-b3fd-42c7-9f33-9772403280d7

📥 Commits

Reviewing files that changed from the base of the PR and between 4b1b8d6 and 5d6ec27.

📒 Files selected for processing (2)
  • holidays/locale/en_US/LC_MESSAGES/US.po
  • holidays/locale/th/LC_MESSAGES/US.po

Summary by CodeRabbit

Release Notes

  • New Features

    • Good Friday, Easter Sunday, Christmas Eve, and New Year's Eve are now recognized across US calendars.
    • Many dates now show combined observance labels (e.g., Christmas Day (observed); Christmas Eve) and half-day closing notes.
    • Holiday coverage extended through 2050 for US states and territories.
  • Localization

    • Added translations for newly recognized holidays in supported locales.

Walkthrough

Adds Easter-related and year-end unofficial observances for the United States (Good Friday, Easter Sunday, Christmas Eve, New Year's Eve) and injects corresponding date mappings and composite labels into many snapshot JSON files across years up to 2050.

Changes

Cohort / File(s) Summary
US source
holidays/countries/united_states.py
Inserted unofficial Easter and year‑end observances (Good Friday, Easter Sunday, Christmas Eve, New Year's Eve) into _populate_unofficial_holidays with a year check and surrounding comments; blocks appear in two insertion points.
US state snapshots
snapshots/countries/US_*.json, snapshots/countries/US_AK.json, snapshots/countries/US_AL.json, snapshots/countries/US_AR.json, snapshots/countries/US_AS.json, snapshots/countries/US_AZ.json, snapshots/countries/US_CA.json, snapshots/countries/US_CO.json
Bulk data additions for Good Friday, Easter Sunday, Christmas Eve, New Year's Eve across many years; many date values converted to composite labels (e.g., "Christmas Day (observed); Christmas Eve", "New Year's Day (observed); New Year's Eve") and some half‑day variants.
US territory / common snapshots
snapshots/countries/AS_COMMON.json, snapshots/countries/GU_COMMON.json, snapshots/countries/MP_COMMON.json, snapshots/countries/PR_COMMON.json, snapshots/countries/UM_COMMON.json
Added Easter and year‑end holiday entries and composite labels across many years; expanded date maps to include Good Friday, Easter Sunday, Christmas Eve, New Year's Eve.
Locale files
holidays/locale/en_US/LC_MESSAGES/US.po, holidays/locale/th/LC_MESSAGES/US.po
PO header metadata bumped and new translation entries added for Easter Sunday (duplicate insertions in locales).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • KJhellico
  • arkid15r
🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning PR addresses issue #3323 by adding Good Friday, Christmas Eve, and New Year's Eve to UNOFFICIAL category. However, snapshot files show Easter Sunday was also added, which goes beyond the stated objective. The PR description and title omit Easter Sunday, yet snapshots confirm it was added. Update PR title and description to reflect all changes made, or clarify why Easter Sunday inclusion differs from stated objectives.
Out of Scope Changes check ⚠️ Warning Easter Sunday additions across multiple snapshot files (US_AK, US_AL, US_AR, etc.) were not mentioned in PR title/description or linked issue #3323, representing undocumented scope expansion. Document the Easter Sunday additions in the PR description and explain their necessity, or remove them if unintended. Ensure all changes align with stated objectives.
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 Title clearly summarizes the main change: adding Good Friday, Christmas Eve, and New Year's Eve to US UNOFFICIAL holidays category.
Description check ✅ Passed Description is related to the changeset, explaining the addition of three holidays to UNOFFICIAL category and mentioning test refactoring.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can scan for known vulnerabilities in your dependencies using OSV Scanner.

OSV Scanner will automatically detect and report security vulnerabilities in your project's dependencies. No additional configuration is required.

@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8aa4a59) to head (5d6ec27).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #3324   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          310       310           
  Lines        18583     18588    +5     
  Branches      2378      2379    +1     
=========================================
+ Hits         18583     18588    +5     

☔ 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.

@Ryderjj89
Copy link

Does this include Easter Sunday as well?

@PPsyrius
Copy link
Collaborator Author

Does this include Easter Sunday as well?

No, but I can include that as well

PPsyrius and others added 3 commits March 14, 2026 18:15
@PPsyrius
Copy link
Collaborator Author

I'm sorry for the forced git push, but that should fix our weird git merge issue earlier

self.assertHolidayName("Citizenship Day", "2016-11-04")
self.assertHolidayName("Election Day", "2016-11-08")
self.assertHolidayName("Constitution Day", "2016-12-08")
def test_commonwealth_covenant_day(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why duplicate these tests with the US? 🙄

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We did re-test all subdivision-level holidays in French dependencies as well 👀

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, yes, really. But is it actually worth to do it?

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

United States missing holidays

3 participants