DEV: Add 2025 Ghana Eid-Ul-Fitr holidays (#710)
Add 2025-03-31 and 2025-04-01 as holidays per https://www.mint.gov.gh/declaration-of-monday-31st-march-2025-and-tuesday-1st-april-2025-as-public-holidays/
This commit is contained in:
parent
3d6b7ae482
commit
d1413cb6d1
|
@ -30,11 +30,23 @@ months:
|
|||
regions: [gh]
|
||||
mday: 6
|
||||
observed: to_monday_if_weekend(date)
|
||||
- name: Eid-ul-Fitr (Day 1)
|
||||
regions: [gh]
|
||||
mday: 31
|
||||
year_ranges:
|
||||
limited: [2025]
|
||||
4:
|
||||
- name: Eid-ul-Fitr
|
||||
regions: [gh]
|
||||
function: eid_ul_fitr(year)
|
||||
observed: to_monday_if_weekend(date)
|
||||
year_ranges:
|
||||
until: 2024
|
||||
- name: Eid-ul-Fitr (Day 2)
|
||||
regions: [gh]
|
||||
mday: 1
|
||||
year_ranges:
|
||||
limited: [2025]
|
||||
5:
|
||||
- name: May Day (Workers' Day)
|
||||
regions: [gh]
|
||||
|
@ -126,12 +138,24 @@ tests:
|
|||
options: ["observed"]
|
||||
expect:
|
||||
name: "Independence Day"
|
||||
- given:
|
||||
date: ["2025-03-31"]
|
||||
regions: ["gh"]
|
||||
options: ["observed"]
|
||||
expect:
|
||||
name: "Eid-ul-Fitr (Day 1)"
|
||||
- given:
|
||||
date: ["2023-04-24", "2024-04-11"]
|
||||
regions: ["gh"]
|
||||
options: ["observed"]
|
||||
expect:
|
||||
name: "Eid-ul-Fitr"
|
||||
- given:
|
||||
date: ["2025-04-01"]
|
||||
regions: ["gh"]
|
||||
options: ["observed"]
|
||||
expect:
|
||||
name: "Eid-ul-Fitr (Day 2)"
|
||||
- given:
|
||||
date: "2022-05-01"
|
||||
regions: ["gh"]
|
||||
|
|
|
@ -16,8 +16,10 @@ module Holidays
|
|||
{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:gh]}],
|
||||
1 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:gh]},
|
||||
{:mday => 7, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Constitution Day", :regions => [:gh]}],
|
||||
3 => [{:mday => 6, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Independence Day", :regions => [:gh]}],
|
||||
4 => [{:function => "eid_ul_fitr(year)", :function_arguments => [:year], :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Eid-ul-Fitr", :regions => [:gh]}],
|
||||
3 => [{:mday => 6, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Independence Day", :regions => [:gh]},
|
||||
{:mday => 31, :year_ranges => { :limited => [2025] },:name => "Eid-ul-Fitr (Day 1)", :regions => [:gh]}],
|
||||
4 => [{:function => "eid_ul_fitr(year)", :function_arguments => [:year], :year_ranges => { :until => 2024 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Eid-ul-Fitr", :regions => [:gh]},
|
||||
{:mday => 1, :year_ranges => { :limited => [2025] },:name => "Eid-ul-Fitr (Day 2)", :regions => [:gh]}],
|
||||
5 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "May Day (Workers' Day)", :regions => [:gh]},
|
||||
{:mday => 25, :type => :informal, :name => "African Union Day", :regions => [:gh]}],
|
||||
6 => [{:function => "eid_ul_adha(year)", :function_arguments => [:year], :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Eid-ul-Adha", :regions => [:gh]}],
|
||||
|
|
|
@ -17,9 +17,13 @@ class GhDefinitionTests < Test::Unit::TestCase # :nodoc:
|
|||
|
||||
assert_equal "Independence Day", (Holidays.on(Date.civil(2022, 3, 7), [:gh], [:observed])[0] || {})[:name]
|
||||
|
||||
assert_equal "Eid-ul-Fitr (Day 1)", (Holidays.on(Date.civil(2025, 3, 31), [:gh], [:observed])[0] || {})[:name]
|
||||
|
||||
assert_equal "Eid-ul-Fitr", (Holidays.on(Date.civil(2023, 4, 24), [:gh], [:observed])[0] || {})[:name]
|
||||
assert_equal "Eid-ul-Fitr", (Holidays.on(Date.civil(2024, 4, 11), [:gh], [:observed])[0] || {})[:name]
|
||||
|
||||
assert_equal "Eid-ul-Fitr (Day 2)", (Holidays.on(Date.civil(2025, 4, 1), [:gh], [:observed])[0] || {})[:name]
|
||||
|
||||
assert_equal "May Day (Workers' Day)", (Holidays.on(Date.civil(2022, 5, 1), [:gh])[0] || {})[:name]
|
||||
|
||||
assert_equal "African Union Day", (Holidays.on(Date.civil(2022, 5, 25), [:gh], [:informal])[0] || {})[:name]
|
||||
|
|
Loading…
Reference in New Issue