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:
Selase Krakani 2025-03-26 16:04:03 +00:00 committed by GitHub
parent 3d6b7ae482
commit d1413cb6d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 32 additions and 2 deletions

View File

@ -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"]

View File

@ -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]}],

View File

@ -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]