Skip to content

Commit

Permalink
fixes for AL, PA, NE, and LA
Browse files Browse the repository at this point in the history
  • Loading branch information
erluti committed Sep 12, 2024
1 parent d8bd4ef commit 4391280
Showing 1 changed file with 40 additions and 10 deletions.
50 changes: 40 additions & 10 deletions us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ months:
function: easter(year)
function_modifier: -47
- name: Mardi Gras Day
regions: [us_la]
regions: [us_al, us_la]
function: easter(year)
function_modifier: -47
- name: Good Friday # informal in general
Expand All @@ -83,7 +83,7 @@ months:
function_modifier: -2
type: informal
- name: Good Friday # public holiday in the following states
regions: [us_ct, us_de, us_gu, us_hi, us_in, us_ky, us_la, us_nj, us_nc, us_nd, us_pr, us_tn]
regions: [us_ct, us_de, us_gu, us_hi, us_in, us_ky, us_la, us_nj, us_nc, us_nd, us_pa, us_pr, us_tn]
function: easter(year)
function_modifier: -2
- name: Easter Sunday
Expand Down Expand Up @@ -157,19 +157,24 @@ months:
regions: [us_tx]
mday: 21
- name: Confederate Memorial Day # Last Monday in April
regions: [us_al, us_ms]
regions: [us_ms]
week: -1
wday: 1
- name: Confederate Memorial Day # 4th Monday in April
regions: [us_al]
week: 4
wday: 1
- name: Confederate Memorial Day
regions: [us_fl]
mday: 26
observed: to_monday_if_sunday(date)
- name: State Holiday # April 20 or April 26
regions: [us_ga]
function: georgia_state_holiday(year, month)
- name: Arbor Day # fixed
- name: Arbor Day
regions: [us_ne]
mday: 28
week: -1
wday: 5
5:
- name: Truman Day # fixed
regions: [us_mo]
Expand Down Expand Up @@ -268,6 +273,9 @@ months:
- name: Election Day
regions: [us_de, us_hi, us_in, us_mt, us_nj, us_ny, us_pa, us_ri]
function: election_day(year)
- name: Election Day # even years only
regions: [us_la]
function: even_year_election_day(year)
- name: Veterans Day
regions: [us]
mday: 11
Expand Down Expand Up @@ -365,6 +373,13 @@ methods:
arguments: year
ruby: |
Holidays::Factory::DateCalculator.day_of_month_calculator.call(year, 11, 1, 1) + 1
even_year_election_day:
# Tuesday after the first Monday of November but only even years for General Elections
arguments: year
ruby: |
if year % 2 == 0
Holidays::Factory::DateCalculator.day_of_month_calculator.call(year, 11, 1, 1) + 1
end
us_inauguration_day:
# January 20, every fourth year, following Presidential election
arguments: year
Expand All @@ -383,7 +398,7 @@ tests:
name: 'Shrove Tuesday'
- given:
date: ['2017-2-28', '2018-2-13', '2019-3-5']
regions: ["us_la"]
regions: ["us_al", "us_la"]
expect:
name: 'Mardi Gras Day'
- given:
Expand All @@ -394,7 +409,7 @@ tests:

- given:
date: ['2017-4-14', '2018-3-30', '2019-4-19']
regions: ["us_ct","us_de","us_gu","us_hi","us_in","us_ky","us_la","us_nj","us_nc","us_nd","us_pr","us_tn"]
regions: ["us_ct","us_de","us_gu","us_hi","us_in","us_ky","us_la","us_nj","us_nc","us_nd","us_pa","us_pr","us_tn"]
expect:
name: 'Good Friday'
- given:
Expand Down Expand Up @@ -592,10 +607,20 @@ tests:
expect:
holiday: false
- given:
date: ['2017-4-24', '2018-4-30', '2019-4-29']
date: ['2017-4-24']
regions: ["us_al", "us_ms"]
expect:
name: "Confederate Memorial Day"
- given:
date: ['2018-4-23', '2019-4-22']
regions: ["us_al"]
expect:
name: "Confederate Memorial Day"
- given:
date: ['2018-4-30', '2019-4-29']
regions: ["us_ms"]
expect:
name: "Confederate Memorial Day"

- given:
date: ['2015-4-27', '2020-4-27', '2026-4-27']
Expand Down Expand Up @@ -632,7 +657,7 @@ tests:
name: "State Holiday"

- given:
date: ['2017-4-28']
date: ['2017-4-28', '2025-4-25']
regions: ["us_ne"]
expect:
name: "Arbor Day"
Expand Down Expand Up @@ -869,10 +894,15 @@ tests:
expect:
holiday: false
- given:
date: ['2017-11-7', '2018-11-6', '2021-11-2']
date: ['2017-11-7', '2021-11-2']
regions: ["us_de", "us_hi", "us_in", "us_mt", "us_nj", "us_ny", "us_pa", "us_ri"]
expect:
name: "Election Day"
- given:
date: ['2018-11-6', '2028-11-7']
regions: ["us_de", "us_hi", "us_in", "us_la", "us_mt", "us_nj", "us_ny", "us_pa", "us_ri"]
expect:
name: "Election Day"
- given:
date: ['2017-11-10', '2018-11-12', '2019-11-11']
regions: ["us"]
Expand Down

0 comments on commit 4391280

Please sign in to comment.