-
Notifications
You must be signed in to change notification settings - Fork 150
Add updates for us_hi to Juneteenth and Independence Day. #322
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
Open
pkarjala
wants to merge
1
commit into
holidays:master
Choose a base branch
from
pkarjala:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -204,6 +204,13 @@ months: | |
| observed: to_weekday_if_weekend(date) | ||
| year_ranges: | ||
| from: 2021 | ||
| - name: Juneteenth National Independence Day # Juneteenth is not a formal holiday in all US states, https://en.wikipedia.org/wiki/Juneteenth | ||
| regions: [us_hi] | ||
| mday: 19 | ||
| observed: to_weekday_if_weekend(date) | ||
| type: informal | ||
| year_ranges: | ||
| from: 2021 | ||
| - name: Emancipation Day in Texas # fixed | ||
| regions: [us_tx] | ||
| mday: 19 | ||
|
|
@@ -219,7 +226,7 @@ months: | |
| regions: [us] | ||
| mday: 4 | ||
| - name: Independence Day (Holiday) | ||
| regions: [us_va] | ||
| regions: [us_va, us_hi] | ||
| mday: 4 | ||
| function: to_weekday_if_weekend(date) # Note: Always if Independence Day don't match | ||
| - name: Pioneer Day # fixed | ||
|
|
@@ -716,16 +723,22 @@ tests: | |
| expect: | ||
| name: "King Kamehameha I Day" | ||
| - given: | ||
| date: ['2021-06-19'] | ||
| date: ['2021-06-18', '2022-06-20', '2023-06-19'] | ||
| regions: ["us"] | ||
| options: ["observed"] | ||
| expect: | ||
| holiday: false | ||
| name: "Juneteenth National Independence Day" | ||
| - given: | ||
| date: ['2021-06-18'] | ||
| regions: ["us"] | ||
| date: ['2021-06-18', '2022-06-20', '2023-06-19'] | ||
| regions: ["us_hi"] | ||
| options: ["observed"] | ||
| expect: | ||
| name: false | ||
| - given: | ||
| date: ['2021-06-18', '2022-06-20', '2023-06-19'] | ||
| regions: ["us_hi"] | ||
| options: ["informal"] | ||
| expect: | ||
| name: "Juneteenth National Independence Day" | ||
| - given: | ||
| date: ['2017-6-19'] | ||
|
|
@@ -769,7 +782,7 @@ tests: | |
| holiday: false | ||
| - given: | ||
| date: ['2020-7-3', '2021-7-5', '2026-7-3'] | ||
| regions: ["us_va"] | ||
| regions: ["us_va, us_hi"] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should not be a single string. It should instead look like |
||
| expect: | ||
| name: "Independence Day (Holiday)" | ||
| - given: | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding
informalhere will not give you what you want. Theus_hiregion inherits fromus. The national formal Juneteeth will come through no matter what if us you useuswhen you make the call.The only way to really fix this is to remove 'juneteeth' from the overall
usregion and then re-add it to every region/state that formally observes it. Unfortunately there is no cleaner fix to this but that's not really a 'gem' problem...that's a USA problem. Some states treat it as formal, others don't. Politics!Let me know how you want to proceed. I think that the 'correct' answer here is that the federal holiday takes precedence, so setting informal is really not an option. It's formal at the federal level. But I'm interested in hearing your feedback.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ppeble by the way, I really wanted to somehow solve this often-faced blocker, that when some sub-group of a country is having special holiday rule - you have to:
I was thinking that we can somehow create a rule:
so basically an ability to define a set of rules for children regions.