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

Update United States holidays: Alaska state holidays correction #2083

Merged
merged 5 commits into from
Oct 26, 2024

Conversation

PPsyrius
Copy link
Collaborator

Proposed change

According to the "Alaska Dispatch":

The changing of the colors and the guard is commemorated in Alaska each Oct. 18, designated "Alaska Day," an official state holiday in 1917 by the third Territorial Legislature. That same year, territorial lawmakers also created Seward's Day, also a state holiday, to mark on each final Monday in March the signing of the purchase treaty.

Thus, the start date for this should be 1917 instead of 1867 as in the current implementation.

As for Seward's Day, a local newspaper mentioned that this wasn't observed in 1921:
image

Note

There's currently 2 state-level checks being used in United States test files at the moment, between

self.assertNoHolidayName(name, self.state_hols["AK"], range(1865, 1917))

and

self.assertNoHolidayName(name, UnitedStates(subdiv="AK", years=range(1865, 1917)))

with negligible performance difference between the two - though we should probably standardize our test code to either one of them.

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

  • I've followed the contributing guidelines
  • I've run make pre-commit, it didn't generate any changes
  • I've run make test, all tests passed locally

Copy link

codecov bot commented Oct 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (4ff5d29) to head (bc92e08).
Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2083   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          191       191           
  Lines        11546     11546           
  Branches      1743      1743           
=========================================
  Hits         11546     11546           

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

@KJhellico
Copy link
Collaborator

There's currently 2 state-level checks being used in United States test files at the moment, between

self.assertNoHolidayName(name, self.state_hols["AK"], range(1865, 1917))

and

self.assertNoHolidayName(name, UnitedStates(subdiv="AK", years=range(1865, 1917)))

But option with UnitedStates(subdiv= is used only for cases with observed=False or for years before 1865.

@PPsyrius PPsyrius requested a review from KJhellico October 26, 2024 14:27
KJhellico
KJhellico previously approved these changes Oct 26, 2024
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.

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.

Could you include the relevant sources into the code?

// I've clarified the contributing instructions as they weren't clear on how it should be done.

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.

👍 looks great!

Copy link

@arkid15r arkid15r added this pull request to the merge queue Oct 26, 2024
Merged via the queue into vacanza:dev with commit b2e6837 Oct 26, 2024
28 of 29 checks passed
@PPsyrius PPsyrius deleted the update_us_holidays_alaska_day branch October 26, 2024 18:07
@arkid15r arkid15r mentioned this pull request Nov 4, 2024
mstuttgart pushed a commit to multidadosti-erp/python-holidays that referenced this pull request Nov 18, 2024
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.

3 participants