+
Skip to content

Update subdivision names for Presidents' Day in the United States #2299

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

Merged
merged 5 commits into from
Feb 17, 2025

Conversation

parkerbxyz
Copy link
Contributor

@parkerbxyz parkerbxyz commented Feb 17, 2025

Proposed change

Many subdivisions in the United States use a different name for “Washington's Birthday” federal holiday. This pull request adds the official name used by each subdivision for this holiday.

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

@Copilot Copilot AI review requested due to automatic review settings February 17, 2025 01:58
@github-actions github-actions bot added the test label Feb 17, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

PR Overview

This PR updates the naming and observance of Washington's Birthday across various US subdivisions to reflect the official holiday names (e.g., Presidents' Day, Washington-Lincoln Day) used in different states. The key changes include:

  • Updating the holiday name for Washington's Birthday in the main US holiday population logic condition with an explicit exclusion list.
  • Adding state‑specific methods for subdivisions (AK, AZ, CA, CO, HI, etc.) with appropriate holiday name updates.
  • Adjusting related tests to match the updated holiday names.

Changes

File Description
holidays/countries/united_states.py Updates the logic and holiday name for Washington's Birthday for various subdivisions.
tests/countries/test_united_states.py Expands and adapts the exclusion list and expected holiday names to align with the revisions.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (3)

holidays/countries/united_states.py:232

  • Verify that the updated exclusion list for Washington's Birthday accurately reflects the official state-specific holiday guidelines. Any inconsistency may cause a mismatch in holiday observance between the default logic and the state-specific methods.
if self._year >= 1971 and self.subdiv not in { ... }:

holidays/countries/united_states.py:797

  • [nitpick] The holiday name 'Presidents Day' for this subdivision is missing an apostrophe compared to other instances ('Presidents' Day'). Please confirm if this difference is intentional based on state guidelines.
self._add_holiday_3rd_mon_of_feb("Presidents Day")

tests/countries/test_united_states.py:362

  • Ensure that the expanded exclusion list in the tests aligns correctly with the updated holiday population rules in the country module. The test list should reflect the same state exclusions and expected observance names as defined in the updated code.
subdiv_dont = { ... }

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

Copy link

codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (31c3cba) to head (1ae62e4).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2299   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          201       201           
  Lines        12291     12332   +41     
  Branches      1745      1768   +23     
=========================================
+ Hits         12291     12332   +41     

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

Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

@parkerbxyz thanks for the hard work you've done to gather those pieces of standardization information!

It seems we need to address some duplicate holidays first (see AK, ID or MD snapshots)

Copy link

Please retry analysis of this Pull-Request directly on SonarQube Cloud

@arkid15r arkid15r requested a review from KJhellico February 17, 2025 17:42
Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

LGTM 👍

// @KJhellico and I made the requested changes in order to include this PR into today's release.

@arkid15r arkid15r enabled auto-merge February 17, 2025 17:44
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.

LGTM.

@arkid15r arkid15r added this pull request to the merge queue Feb 17, 2025
Merged via the queue into vacanza:dev with commit 2dc766e Feb 17, 2025
32 checks passed
@KJhellico KJhellico mentioned this pull request Feb 17, 2025
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.

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