holidays 8.5.0 → 8.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe8bda2ece3b3ebd51396c7e789afdc177973efecd1b4aa61f255e48c5b63030
4
- data.tar.gz: 1124d98b145d9275c755a0e6b5a026602f7bdc017f966d097ad291383df4cc1b
3
+ metadata.gz: 9eb1a9a2387a3734d10203b125345004d0c470ccc2394b82e36f57277a487db0
4
+ data.tar.gz: 9a77c89d65379366e70b9d6e3eed67080ce5fadb096c11dad1b5edb81dee2e8c
5
5
  SHA512:
6
- metadata.gz: c26a9c82704f7b5feb34b93f882fe7ac42fafcad20e69afb4a2e36b39575db590e000f7a955545fb5e9232925132ab665b7aa9bc192cec86937c38f1e07e7bb9
7
- data.tar.gz: b8e894ae48e9dbe1a6ee94d2a64de6f9f85ea524f0b0c39f2ac20b8aef59a63d620b9e2d24220352d364506c4a3348d849ffe907d45ef68384d80267adc71a12
6
+ metadata.gz: 5580b2c4ed9f227fc68558382fa2635df1fb234291b7bd554f3675bea59cf81345be20de1cc7fa8babb9cd445cf1d076dde9eebed1947d75a5a956fdf2ae2158
7
+ data.tar.gz: 210b384735179c141e9c15d0de847449a3e70cd7e468453afd9b038afced110c1ea957b69d48e1196e524a2da3804af1d3502558407f4a9b71e998fb9ae3da64
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Ruby Holidays Gem CHANGELOG
2
2
 
3
+ ## 8.6.0
4
+
5
+ * Update to [v5.5.0 definitions](https://github.com/holidays/definitions/releases/tag/v5.5.0). Please see the changelog for the definition details.
6
+ * Temporarily remove jruby from required jobs due to test coverage issues
7
+
3
8
  ## 8.5.0
4
9
 
5
10
  * Update submodule definitions.
@@ -37,8 +37,9 @@ module Holidays
37
37
  {:function => "qld_queens_birthday_june(year)", :function_arguments => [:year], :name => "Queen's Birthday", :regions => [:au_qld]},
38
38
  {:mday => 6, :type => :informal, :name => "Queensland Day", :regions => [:au_qld]}],
39
39
  7 => [{:wday => 5, :week => 3, :name => "Cairns Show", :regions => [:au_qld_cairns]}],
40
- 8 => [{:wday => 3, :week => -3, :name => "Ekka", :regions => [:au_qld_brisbane]}],
41
- 9 => [{:wday => 1, :week => -1, :name => "Queen's Birthday", :regions => [:au_wa]},
40
+ 8 => [{:function => "qld_brisbane_ekka_holiday(year)", :function_arguments => [:year], :name => "Ekka", :regions => [:au_qld_brisbane]}],
41
+ 9 => [{:mday => 22, :year_ranges => { :limited => [2022] },:name => "National Day of Mourning for Her Majesty Queen Elizabeth II", :regions => [:au]},
42
+ {:wday => 1, :week => -1, :name => "Queen's Birthday", :regions => [:au_wa]},
42
43
  {:wday => 1, :week => -1, :name => "Family & Community Day", :regions => [:au_act]}],
43
44
  10 => [{:function => "afl_grand_final(year)", :function_arguments => [:year], :name => "Friday before the AFL Grand Final", :regions => [:au_vic]},
44
45
  {:wday => 1, :week => 1, :name => "Labour Day", :regions => [:au_act, :au_nsw, :au_sa]},
@@ -128,6 +129,17 @@ else
128
129
  end
129
130
  },
130
131
 
132
+ "qld_brisbane_ekka_holiday(year)" => Proc.new { |year|
133
+ first_friday = Holidays::Factory::DateCalculator.day_of_month_calculator.call(year, 8, :first, :friday)
134
+
135
+ if first_friday < 5
136
+ second_friday = Date.civil(year, 8, Holidays::Factory::DateCalculator.day_of_month_calculator.call(year, 8, :second, :friday))
137
+ second_friday + 5 # The next Wednesday
138
+ else
139
+ Date.civil(year, 8, first_friday) + 5
140
+ end
141
+ },
142
+
131
143
 
132
144
  }
133
145
  end
@@ -71,6 +71,7 @@ module Holidays
71
71
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Ascension", :regions => [:fr]},
72
72
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :type => :informal, :name => "Pentecôte", :regions => [:fr]},
73
73
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "Lundi de Pentecôte", :regions => [:fr]},
74
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -21, :type => :informal, :name => "Mothering Sunday", :regions => [:gb]},
74
75
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:gb]},
75
76
  {:function => "easter(year)", :function_arguments => [:year], :name => "Easter Sunday", :regions => [:gb]},
76
77
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir, :je, :gb_jsy, :gg, :gb_gsy]},
@@ -202,6 +203,7 @@ module Holidays
202
203
  {:mday => 1, :name => "Nový rok", :regions => [:sk]},
203
204
  {:mday => 6, :name => "Zjavenie Pána (Traja králi)", :regions => [:sk]},
204
205
  {:mday => 1, :name => "novo leto", :regions => [:si]},
206
+ {:mday => 2, :name => "novo leto", :regions => [:si]},
205
207
  {:mday => 1, :name => "New Year's Day", :regions => [:bg_en]},
206
208
  {:mday => 1, :name => "Нова година", :regions => [:bg_bg]},
207
209
  {:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Новий Рік", :regions => [:ua]},
@@ -512,6 +514,7 @@ module Holidays
512
514
  {:mday => 8, :name => "Día de Extremadura", :regions => [:es_ex]},
513
515
  {:mday => 11, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Fiesta Nacional de Cataluña", :regions => [:es_ct]},
514
516
  {:mday => 24, :name => "La Mercè", :regions => [:es_ct]},
517
+ {:mday => 19, :year_ranges => { :limited => [2022] },:name => "Bank Holiday for the State Funeral of Queen Elizabeth II", :regions => [:gb]},
515
518
  {:mday => 8, :name => "Festa della Madonna di Monte Berico", :regions => [:it_vi]},
516
519
  {:mday => 8, :name => "Maria Geburt", :regions => [:li]},
517
520
  {:mday => 24, :year_ranges => { :limited => [2018] },:name => "Viņa Svētības pāvesta Franciska pastorālās vizītes Latvijā diena", :regions => [:lv]},
@@ -605,8 +608,11 @@ when 2018
605
608
  # https://likumi.lv/ta/id/281541 (Ministru kabineta rīkojums Nr. 252 "Par XXVI Vispārējo latviešu dziesmu un XVI Deju svētku norises laiku")
606
609
  Date.new(2018, 7, 8)
607
610
  when 2023
611
+ # https://likumi.lv/ta/id/330067 (Ministru kabineta rīkojums Nr. 92 "Par XXVII Vispārējo latviešu dziesmu un XVII Deju svētku norises laiku")
612
+ Date.new(2023, 7, 9)
613
+ when 2028
608
614
  # Event's period/next year is known, but precise dates aren't.
609
- # Previously, dates were announced 2 years ahead, so at ~2021-05 this method would need to be revisited.
615
+ # Previously, dates were announced 2 years ahead, so on ~2026-05 this method would need to be revisited.
610
616
  end
611
617
  },
612
618
 
@@ -16,6 +16,7 @@ module Holidays
16
16
  {:wday => 1, :week => 3, :name => "Birthday of Martin Luther King, Jr", :regions => [:federalreserve]}],
17
17
  2 => [{:wday => 1, :week => 3, :name => "Washington's Birthday", :regions => [:federalreserve]}],
18
18
  5 => [{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:federalreserve]}],
19
+ 6 => [{:mday => 19, :year_ranges => { :from => 2021 },:observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Juneteenth National Independence Day", :regions => [:federalreserve]}],
19
20
  7 => [{:mday => 4, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Independence Day", :regions => [:federalreserve]}],
20
21
  9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:federalreserve]}],
21
22
  10 => [{:wday => 1, :week => 2, :name => "Columbus Day", :regions => [:federalreserve]}],
@@ -16,7 +16,7 @@ module Holidays
16
16
  {:wday => 1, :week => 3, :name => "Birthday of Martin Luther King, Jr", :regions => [:federalreservebanks]}],
17
17
  2 => [{:wday => 1, :week => 3, :name => "Washington's Birthday", :regions => [:federalreservebanks]}],
18
18
  5 => [{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:federalreservebanks]}],
19
- 6 => [{:mday => 19, :year_ranges => { :from => 2021 },:observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Juneteenth National Independence Day", :regions => [:federalreservebanks]}],
19
+ 6 => [{:mday => 19, :year_ranges => { :from => 2021 },:observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Juneteenth National Independence Day", :regions => [:federalreservebanks]}],
20
20
  7 => [{:mday => 4, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Independence Day", :regions => [:federalreservebanks]}],
21
21
  9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:federalreservebanks]}],
22
22
  10 => [{:wday => 1, :week => 2, :name => "Columbus Day", :regions => [:federalreservebanks]}],
@@ -12,7 +12,8 @@ module Holidays
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:gb]},
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -21, :type => :informal, :name => "Mothering Sunday", :regions => [:gb]},
16
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:gb]},
16
17
  {:function => "easter(year)", :function_arguments => [:year], :name => "Easter Sunday", :regions => [:gb]},
17
18
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir, :je, :gb_jsy, :gg, :gb_gsy]}],
18
19
  1 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:gb]},
@@ -31,6 +32,7 @@ module Holidays
31
32
  {:mday => 12, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Battle of the Boyne", :regions => [:gb_nir]}],
32
33
  8 => [{:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:gb_sct]},
33
34
  {:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir, :je, :gb_jsy, :gg, :gb_gsy]}],
35
+ 9 => [{:mday => 19, :year_ranges => { :limited => [2022] },:name => "Bank Holiday for the State Funeral of Queen Elizabeth II", :regions => [:gb]}],
34
36
  11 => [{:mday => 5, :type => :informal, :name => "Guy Fawkes Day", :regions => [:gb]},
35
37
  {:mday => 30, :year_ranges => { :until => 2006 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :type => :informal, :name => "St. Andrew's Day", :regions => [:gb_sct]},
36
38
  {:mday => 30, :year_ranges => { :from => 2007 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "St. Andrew's Day", :regions => [:gb_sct]}],
@@ -40,8 +40,11 @@ when 2018
40
40
  # https://likumi.lv/ta/id/281541 (Ministru kabineta rīkojums Nr. 252 "Par XXVI Vispārējo latviešu dziesmu un XVI Deju svētku norises laiku")
41
41
  Date.new(2018, 7, 8)
42
42
  when 2023
43
+ # https://likumi.lv/ta/id/330067 (Ministru kabineta rīkojums Nr. 92 "Par XXVII Vispārējo latviešu dziesmu un XVII Deju svētku norises laiku")
44
+ Date.new(2023, 7, 9)
45
+ when 2028
43
46
  # Event's period/next year is known, but precise dates aren't.
44
- # Previously, dates were announced 2 years ahead, so at ~2021-05 this method would need to be revisited.
47
+ # Previously, dates were announced 2 years ahead, so on ~2026-05 this method would need to be revisited.
45
48
  end
46
49
  },
47
50
 
@@ -31,7 +31,7 @@ module Holidays
31
31
  {:wday => 6, :week => 3, :type => :informal, :name => "Armed Forces Day", :regions => [:us]}],
32
32
  6 => [{:wday => 0, :week => 3, :type => :informal, :name => "Día del Padre", :regions => [:mx]},
33
33
  {:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
34
- 9 => [{:mday => 15, :name => "Grito de Dolores", :regions => [:mx]},
34
+ 9 => [{:mday => 15, :type => :informal, :name => "Grito de Dolores", :regions => [:mx]},
35
35
  {:mday => 16, :name => "Día de la Independencia", :regions => [:mx]}],
36
36
  10 => [{:mday => 12, :type => :informal, :name => "Día de la Raza", :regions => [:mx]},
37
37
  {:mday => 31, :type => :informal, :name => "Halloween", :regions => [:us, :ca]}],
@@ -100,7 +100,7 @@ module Holidays
100
100
  {:mday => 27, :name => "Lyndon Baines Johnson Day", :regions => [:us_tx]}],
101
101
  9 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:ca]},
102
102
  {:mday => 30, :year_ranges => { :from => 2021 },:name => "National Day for Truth and Reconciliation", :regions => [:ca]},
103
- {:mday => 15, :name => "Grito de Dolores", :regions => [:mx]},
103
+ {:mday => 15, :type => :informal, :name => "Grito de Dolores", :regions => [:mx]},
104
104
  {:mday => 16, :name => "Día de la Independencia", :regions => [:mx]},
105
105
  {:wday => 1, :week => 1, :name => "Labor Day", :regions => [:us]},
106
106
  {:function => "rosh_hashanah(year)", :function_arguments => [:year], :name => "Rosh Hashanah", :regions => [:us_tx]},
@@ -17,6 +17,7 @@ module Holidays
17
17
  {:wday => 1, :week => 3, :name => "Martin Luther King, Jr. Day", :regions => [:nyse]}],
18
18
  2 => [{:wday => 1, :week => 3, :name => "Presidents' Day", :regions => [:nyse]}],
19
19
  5 => [{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:nyse]}],
20
+ 6 => [{:mday => 19, :year_ranges => { :from => 2022 },:observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Juneteenth National Independence Day", :regions => [:nyse]}],
20
21
  7 => [{:mday => 4, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Independence Day", :regions => [:nyse]}],
21
22
  9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:nyse]}],
22
23
  11 => [{:wday => 4, :week => 4, :name => "Thanksgiving", :regions => [:nyse]}],
@@ -13,7 +13,8 @@ module Holidays
13
13
  def self.holidays_by_month
14
14
  {
15
15
  0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:nz]},
16
- {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:nz]}],
16
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:nz]},
17
+ {:function => "matariki(year)", :function_arguments => [:year], :name => "Matariki", :regions => [:nz]}],
17
18
  1 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:nz]},
18
19
  {:mday => 2, :observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "Day after New Year's Day", :regions => [:nz]},
19
20
  {:mday => 17, :name => "Southland Anniversary Day", :regions => [:nz_sl]},
@@ -59,6 +60,43 @@ date - 3
59
60
  date + 7
60
61
  },
61
62
 
63
+ "matariki(year)" => Proc.new { |year|
64
+ @matariki_dates ||= {
65
+ '2022' => Date.civil(2022, 6, 24),
66
+ '2023' => Date.civil(2023, 7, 14),
67
+ '2024' => Date.civil(2024, 6, 28),
68
+ '2025' => Date.civil(2025, 6, 20),
69
+ '2026' => Date.civil(2026, 7, 10),
70
+ '2027' => Date.civil(2027, 6, 25),
71
+ '2028' => Date.civil(2028, 7, 14),
72
+ '2029' => Date.civil(2029, 7, 6),
73
+ '2030' => Date.civil(2030, 6, 21),
74
+ '2031' => Date.civil(2031, 7, 11),
75
+ '2032' => Date.civil(2032, 7, 2),
76
+ '2033' => Date.civil(2033, 6, 24),
77
+ '2034' => Date.civil(2034, 7, 7),
78
+ '2035' => Date.civil(2035, 6, 29),
79
+ '2036' => Date.civil(2036, 7, 18),
80
+ '2037' => Date.civil(2037, 7, 10),
81
+ '2038' => Date.civil(2038, 6, 25),
82
+ '2039' => Date.civil(2039, 7, 15),
83
+ '2040' => Date.civil(2040, 7, 6),
84
+ '2041' => Date.civil(2041, 7, 19),
85
+ '2042' => Date.civil(2042, 7, 11),
86
+ '2043' => Date.civil(2043, 7, 3),
87
+ '2044' => Date.civil(2044, 6, 24),
88
+ '2045' => Date.civil(2045, 7, 7),
89
+ '2046' => Date.civil(2046, 6, 29),
90
+ '2047' => Date.civil(2047, 7, 19),
91
+ '2048' => Date.civil(2048, 7, 3),
92
+ '2049' => Date.civil(2049, 6, 25),
93
+ '2050' => Date.civil(2050, 7, 15),
94
+ '2051' => Date.civil(2051, 6, 30),
95
+ '2052' => Date.civil(2052, 6, 21),
96
+ }
97
+ @matariki_dates[year.to_s]
98
+ },
99
+
62
100
 
63
101
  }
64
102
  end
@@ -24,7 +24,7 @@ module Holidays
24
24
  {:mday => 16, :name => "Дан државности Србије", :regions => [:rs_cyrl]}],
25
25
  5 => [{:mday => 1, :name => "Празник рада", :regions => [:rs_cyrl]},
26
26
  {:mday => 2, :name => "Празник рада", :regions => [:rs_cyrl]},
27
- {:mday => 9, :name => "Дан победе над фашизмом", :regions => [:rs_cyrl]}],
27
+ {:mday => 9, :type => :informal, :name => "Дан победе над фашизмом", :regions => [:rs_cyrl]}],
28
28
  6 => [{:mday => 28, :name => "Видовдан", :regions => [:rs_cyrl]}],
29
29
  11 => [{:mday => 11, :name => "Дан примирја", :regions => [:rs_cyrl]}]
30
30
  }
@@ -24,7 +24,7 @@ module Holidays
24
24
  {:mday => 16, :name => "Dan državnosti Srbije", :regions => [:rs_la]}],
25
25
  5 => [{:mday => 1, :name => "Praznik rada", :regions => [:rs_la]},
26
26
  {:mday => 2, :name => "Praznik rada", :regions => [:rs_la]},
27
- {:mday => 9, :name => "Dan pobede", :regions => [:rs_la]}],
27
+ {:mday => 9, :type => :informal, :name => "Dan pobede", :regions => [:rs_la]}],
28
28
  6 => [{:mday => 28, :name => "Vidovdan", :regions => [:rs_la]}],
29
29
  11 => [{:mday => 11, :name => "Dan primirja", :regions => [:rs_la]}]
30
30
  }
@@ -15,7 +15,8 @@ module Holidays
15
15
  0 => [{:function => "easter(year)", :function_arguments => [:year], :name => "velikonočna nedelja", :regions => [:si]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "velikonočni ponedeljek", :regions => [:si]},
17
17
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :name => "binkošti", :regions => [:si]}],
18
- 1 => [{:mday => 1, :name => "novo leto", :regions => [:si]}],
18
+ 1 => [{:mday => 1, :name => "novo leto", :regions => [:si]},
19
+ {:mday => 2, :name => "novo leto", :regions => [:si]}],
19
20
  2 => [{:mday => 8, :name => "Prešernov dan, slovenski kulturni praznik", :regions => [:si]}],
20
21
  4 => [{:mday => 27, :name => "dan upora proti okupatorju", :regions => [:si]}],
21
22
  5 => [{:mday => 1, :name => "praznik dela", :regions => [:si]},
@@ -1,3 +1,3 @@
1
1
  module Holidays
2
- VERSION = '8.5.0'
2
+ VERSION = '8.6.0'
3
3
  end
@@ -198,5 +198,21 @@ assert_equal "Queen's Birthday", (Holidays.on(Date.civil(2016, 9, 26), [:au_wa])
198
198
 
199
199
  assert_nil (Holidays.on(Date.civil(2021, 4, 26), [:au_vic])[0] || {})[:name]
200
200
 
201
+ assert_equal "Ekka", (Holidays.on(Date.civil(2019, 8, 14), [:au_qld_brisbane])[0] || {})[:name]
202
+
203
+ assert_equal "Ekka", (Holidays.on(Date.civil(2022, 8, 10), [:au_qld_brisbane])[0] || {})[:name]
204
+
205
+ assert_equal "Ekka", (Holidays.on(Date.civil(2023, 8, 16), [:au_qld_brisbane])[0] || {})[:name]
206
+
207
+ assert_equal "Ekka", (Holidays.on(Date.civil(2024, 8, 14), [:au_qld_brisbane])[0] || {})[:name]
208
+
209
+ assert_equal "Ekka", (Holidays.on(Date.civil(2025, 8, 13), [:au_qld_brisbane])[0] || {})[:name]
210
+
211
+ assert_equal "National Day of Mourning for Her Majesty Queen Elizabeth II", (Holidays.on(Date.civil(2022, 9, 22), [:au])[0] || {})[:name]
212
+
213
+ assert_nil (Holidays.on(Date.civil(2023, 9, 22), [:au])[0] || {})[:name]
214
+
215
+ assert_nil (Holidays.on(Date.civil(2021, 9, 22), [:au])[0] || {})[:name]
216
+
201
217
  end
202
218
  end
@@ -455,6 +455,10 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
455
455
 
456
456
  assert_equal "Saint-Étienne", (Holidays.on(Date.civil(2017, 12, 26), [:fr_a, :fr_m], [:informal])[0] || {})[:name]
457
457
 
458
+ assert_equal "Mothering Sunday", (Holidays.on(Date.civil(2022, 3, 27), [:gb], [:informal])[0] || {})[:name]
459
+
460
+ assert_equal "Mothering Sunday", (Holidays.on(Date.civil(2021, 3, 14), [:gb], [:informal])[0] || {})[:name]
461
+
458
462
  assert_equal "Good Friday", (Holidays.on(Date.civil(2008, 3, 21), [:gb], [:informal])[0] || {})[:name]
459
463
 
460
464
  assert_equal "Easter Sunday", (Holidays.on(Date.civil(2008, 3, 23), [:gb], [:informal])[0] || {})[:name]
@@ -583,6 +587,12 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
583
587
 
584
588
  assert_equal "Platinum Jubilee", (Holidays.on(Date.civil(2022, 6, 3), [:gb])[0] || {})[:name]
585
589
 
590
+ assert_equal "Bank Holiday for the State Funeral of Queen Elizabeth II", (Holidays.on(Date.civil(2022, 9, 19), [:gb])[0] || {})[:name]
591
+
592
+ assert_nil (Holidays.on(Date.civil(2023, 9, 19), [:gb])[0] || {})[:name]
593
+
594
+ assert_nil (Holidays.on(Date.civil(2021, 9, 19), [:gb])[0] || {})[:name]
595
+
586
596
  assert_equal "Bank Holiday", (Holidays.on(Date.civil(2023, 5, 29), [:gb])[0] || {})[:name]
587
597
 
588
598
  assert_equal "Nova godina", (Holidays.on(Date.civil(2012, 1, 1), [:hr], [:informal])[0] || {})[:name]
@@ -902,11 +912,17 @@ assert_equal "Jāņu diena", (Holidays.on(Date.civil(2020, 6, 24), [:lv])[0] ||
902
912
  assert_equal "Jāņu diena", (Holidays.on(Date.civil(2029, 6, 24), [:lv])[0] || {})[:name]
903
913
 
904
914
  assert_equal "Vispārējo latviešu Dziesmu un deju svētku noslēguma diena", (Holidays.on(Date.civil(2018, 7, 8), [:lv])[0] || {})[:name]
915
+ assert_equal "Vispārējo latviešu Dziesmu un deju svētku noslēguma diena", (Holidays.on(Date.civil(2023, 7, 9), [:lv])[0] || {})[:name]
905
916
 
906
917
  assert_equal "Vispārējo latviešu Dziesmu un deju svētku noslēguma diena", (Holidays.on(Date.civil(2018, 7, 9), [:lv], [:observed])[0] || {})[:name]
918
+ assert_equal "Vispārējo latviešu Dziesmu un deju svētku noslēguma diena", (Holidays.on(Date.civil(2023, 7, 10), [:lv], [:observed])[0] || {})[:name]
907
919
 
908
920
  assert_nil (Holidays.on(Date.civil(2019, 7, 8), [:lv])[0] || {})[:name]
909
921
  assert_nil (Holidays.on(Date.civil(2019, 7, 9), [:lv])[0] || {})[:name]
922
+ assert_nil (Holidays.on(Date.civil(2022, 7, 8), [:lv])[0] || {})[:name]
923
+ assert_nil (Holidays.on(Date.civil(2022, 7, 9), [:lv])[0] || {})[:name]
924
+ assert_nil (Holidays.on(Date.civil(2024, 7, 8), [:lv])[0] || {})[:name]
925
+ assert_nil (Holidays.on(Date.civil(2024, 7, 9), [:lv])[0] || {})[:name]
910
926
 
911
927
  assert_equal "Viņa Svētības pāvesta Franciska pastorālās vizītes Latvijā diena", (Holidays.on(Date.civil(2018, 9, 24), [:lv])[0] || {})[:name]
912
928
 
@@ -109,5 +109,11 @@ class FederalreserveDefinitionTests < Test::Unit::TestCase # :nodoc:
109
109
 
110
110
  assert_equal "Christmas Day", (Holidays.on(Date.civil(2016, 12, 26), [:federalreserve], [:observed])[0] || {})[:name]
111
111
 
112
+ assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2021, 6, 18), [:federalreserve], [:observed])[0] || {})[:name]
113
+
114
+ assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2022, 6, 20), [:federalreserve], [:observed])[0] || {})[:name]
115
+
116
+ assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2023, 6, 19), [:federalreserve], [:observed])[0] || {})[:name]
117
+
112
118
  end
113
119
  end
@@ -15,10 +15,6 @@ class FederalreservebanksDefinitionTests < Test::Unit::TestCase # :nodoc:
15
15
 
16
16
  assert_equal "Memorial Day", (Holidays.on(Date.civil(2012, 5, 28), [:federalreservebanks], [:observed])[0] || {})[:name]
17
17
 
18
- assert_nil (Holidays.on(Date.civil(2021, 6, 19), [:federalreservebanks], [:observed])[0] || {})[:name]
19
-
20
- assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2021, 6, 18), [:federalreservebanks], [:observed])[0] || {})[:name]
21
-
22
18
  assert_equal "Independence Day", (Holidays.on(Date.civil(2012, 7, 4), [:federalreservebanks], [:observed])[0] || {})[:name]
23
19
 
24
20
  assert_equal "Labor Day", (Holidays.on(Date.civil(2012, 9, 3), [:federalreservebanks], [:observed])[0] || {})[:name]
@@ -247,5 +243,9 @@ class FederalreservebanksDefinitionTests < Test::Unit::TestCase # :nodoc:
247
243
 
248
244
  assert_equal "Christmas Day", (Holidays.on(Date.civil(2024, 12, 25), [:federalreservebanks], [:observed])[0] || {})[:name]
249
245
 
246
+ assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2022, 6, 20), [:federalreservebanks], [:observed])[0] || {})[:name]
247
+
248
+ assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2023, 6, 19), [:federalreservebanks], [:observed])[0] || {})[:name]
249
+
250
250
  end
251
251
  end
@@ -7,6 +7,10 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
7
7
  class GbDefinitionTests < Test::Unit::TestCase # :nodoc:
8
8
 
9
9
  def test_gb
10
+ assert_equal "Mothering Sunday", (Holidays.on(Date.civil(2022, 3, 27), [:gb], [:informal])[0] || {})[:name]
11
+
12
+ assert_equal "Mothering Sunday", (Holidays.on(Date.civil(2021, 3, 14), [:gb], [:informal])[0] || {})[:name]
13
+
10
14
  assert_equal "Good Friday", (Holidays.on(Date.civil(2008, 3, 21), [:gb], [:informal])[0] || {})[:name]
11
15
 
12
16
  assert_equal "Easter Sunday", (Holidays.on(Date.civil(2008, 3, 23), [:gb], [:informal])[0] || {})[:name]
@@ -135,6 +139,12 @@ class GbDefinitionTests < Test::Unit::TestCase # :nodoc:
135
139
 
136
140
  assert_equal "Platinum Jubilee", (Holidays.on(Date.civil(2022, 6, 3), [:gb])[0] || {})[:name]
137
141
 
142
+ assert_equal "Bank Holiday for the State Funeral of Queen Elizabeth II", (Holidays.on(Date.civil(2022, 9, 19), [:gb])[0] || {})[:name]
143
+
144
+ assert_nil (Holidays.on(Date.civil(2023, 9, 19), [:gb])[0] || {})[:name]
145
+
146
+ assert_nil (Holidays.on(Date.civil(2021, 9, 19), [:gb])[0] || {})[:name]
147
+
138
148
  assert_equal "Bank Holiday", (Holidays.on(Date.civil(2023, 5, 29), [:gb])[0] || {})[:name]
139
149
 
140
150
  end
@@ -52,11 +52,17 @@ assert_equal "Jāņu diena", (Holidays.on(Date.civil(2020, 6, 24), [:lv])[0] ||
52
52
  assert_equal "Jāņu diena", (Holidays.on(Date.civil(2029, 6, 24), [:lv])[0] || {})[:name]
53
53
 
54
54
  assert_equal "Vispārējo latviešu Dziesmu un deju svētku noslēguma diena", (Holidays.on(Date.civil(2018, 7, 8), [:lv])[0] || {})[:name]
55
+ assert_equal "Vispārējo latviešu Dziesmu un deju svētku noslēguma diena", (Holidays.on(Date.civil(2023, 7, 9), [:lv])[0] || {})[:name]
55
56
 
56
57
  assert_equal "Vispārējo latviešu Dziesmu un deju svētku noslēguma diena", (Holidays.on(Date.civil(2018, 7, 9), [:lv], [:observed])[0] || {})[:name]
58
+ assert_equal "Vispārējo latviešu Dziesmu un deju svētku noslēguma diena", (Holidays.on(Date.civil(2023, 7, 10), [:lv], [:observed])[0] || {})[:name]
57
59
 
58
60
  assert_nil (Holidays.on(Date.civil(2019, 7, 8), [:lv])[0] || {})[:name]
59
61
  assert_nil (Holidays.on(Date.civil(2019, 7, 9), [:lv])[0] || {})[:name]
62
+ assert_nil (Holidays.on(Date.civil(2022, 7, 8), [:lv])[0] || {})[:name]
63
+ assert_nil (Holidays.on(Date.civil(2022, 7, 9), [:lv])[0] || {})[:name]
64
+ assert_nil (Holidays.on(Date.civil(2024, 7, 8), [:lv])[0] || {})[:name]
65
+ assert_nil (Holidays.on(Date.civil(2024, 7, 9), [:lv])[0] || {})[:name]
60
66
 
61
67
  assert_equal "Viņa Svētības pāvesta Franciska pastorālās vizītes Latvijā diena", (Holidays.on(Date.civil(2018, 9, 24), [:lv])[0] || {})[:name]
62
68
 
@@ -15,6 +15,8 @@ class MxDefinitionTests < Test::Unit::TestCase # :nodoc:
15
15
 
16
16
  assert_equal "Cinco de Mayo", (Holidays.on(Date.civil(2007, 5, 5), [:mx], [:informal])[0] || {})[:name]
17
17
 
18
+ assert_equal "Grito de Dolores", (Holidays.on(Date.civil(2007, 9, 15), [:mx], [:informal])[0] || {})[:name]
19
+
18
20
  assert_equal "Día de la Independencia", (Holidays.on(Date.civil(2007, 9, 16), [:mx], [:informal])[0] || {})[:name]
19
21
 
20
22
  assert_equal "Todos los Santos", (Holidays.on(Date.civil(2007, 11, 1), [:mx], [:informal])[0] || {})[:name]
@@ -267,6 +267,8 @@ assert_equal "Boxing Day", (Holidays.on(Date.civil(2015, 12, 28), [:ca_on], [:ob
267
267
 
268
268
  assert_equal "Cinco de Mayo", (Holidays.on(Date.civil(2007, 5, 5), [:mx], [:informal])[0] || {})[:name]
269
269
 
270
+ assert_equal "Grito de Dolores", (Holidays.on(Date.civil(2007, 9, 15), [:mx], [:informal])[0] || {})[:name]
271
+
270
272
  assert_equal "Día de la Independencia", (Holidays.on(Date.civil(2007, 9, 16), [:mx], [:informal])[0] || {})[:name]
271
273
 
272
274
  assert_equal "Todos los Santos", (Holidays.on(Date.civil(2007, 11, 1), [:mx], [:informal])[0] || {})[:name]
@@ -35,5 +35,12 @@ assert_equal "New Year's Day", (Holidays.on(Date.civil(2012, 1, 2), [:nyse], [:o
35
35
  assert_equal "New Year's Day", (Holidays.on(Date.civil(2011, 1, 1), [:nyse], [:observed])[0] || {})[:name]
36
36
  assert_equal "New Year's Day", (Holidays.on(Date.civil(2006, 1, 2), [:nyse], [:observed])[0] || {})[:name]
37
37
 
38
+ assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2022, 6, 20), [:nyse], [:observed])[0] || {})[:name]
39
+ assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2023, 6, 19), [:nyse], [:observed])[0] || {})[:name]
40
+ assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2024, 6, 19), [:nyse], [:observed])[0] || {})[:name]
41
+ assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2027, 6, 18), [:nyse], [:observed])[0] || {})[:name]
42
+
43
+ assert_nil (Holidays.on(Date.civil(2021, 6, 18), [:nyse], [:observed])[0] || {})[:name]
44
+
38
45
  end
39
46
  end
@@ -55,5 +55,9 @@ class NzDefinitionTests < Test::Unit::TestCase # :nodoc:
55
55
 
56
56
  assert_equal "Taranaki Anniversary Day", (Holidays.on(Date.civil(2019, 3, 11), [:nz_ta], [:observed])[0] || {})[:name]
57
57
 
58
+ assert_equal "Matariki", (Holidays.on(Date.civil(2022, 6, 24), [:nz])[0] || {})[:name]
59
+
60
+ assert_equal "Matariki", (Holidays.on(Date.civil(2052, 6, 21), [:nz])[0] || {})[:name]
61
+
58
62
  end
59
63
  end
@@ -20,7 +20,7 @@ assert_equal "Дан државности Србије", (Holidays.on(Date.civil
20
20
  assert_equal "Празник рада", (Holidays.on(Date.civil(2017, 5, 1), [:rs_cyrl])[0] || {})[:name]
21
21
  assert_equal "Празник рада", (Holidays.on(Date.civil(2017, 5, 2), [:rs_cyrl])[0] || {})[:name]
22
22
 
23
- assert_equal "Дан победе над фашизмом", (Holidays.on(Date.civil(2017, 5, 9), [:rs_cyrl])[0] || {})[:name]
23
+ assert_equal "Дан победе над фашизмом", (Holidays.on(Date.civil(2017, 5, 9), [:rs_cyrl], [:informal])[0] || {})[:name]
24
24
 
25
25
  assert_equal "Видовдан", (Holidays.on(Date.civil(2017, 6, 28), [:rs_cyrl])[0] || {})[:name]
26
26
 
@@ -20,7 +20,7 @@ assert_equal "Dan državnosti Srbije", (Holidays.on(Date.civil(2017, 2, 16), [:r
20
20
  assert_equal "Praznik rada", (Holidays.on(Date.civil(2017, 5, 1), [:rs_la])[0] || {})[:name]
21
21
  assert_equal "Praznik rada", (Holidays.on(Date.civil(2017, 5, 2), [:rs_la])[0] || {})[:name]
22
22
 
23
- assert_equal "Dan pobede", (Holidays.on(Date.civil(2017, 5, 9), [:rs_la])[0] || {})[:name]
23
+ assert_equal "Dan pobede", (Holidays.on(Date.civil(2017, 5, 9), [:rs_la], [:informal])[0] || {})[:name]
24
24
 
25
25
  assert_equal "Vidovdan", (Holidays.on(Date.civil(2017, 6, 28), [:rs_la])[0] || {})[:name]
26
26
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: holidays
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.5.0
4
+ version: 8.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Dunae
8
8
  - Phil Peble
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-01-05 00:00:00.000000000 Z
12
+ date: 2022-09-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -379,7 +379,7 @@ homepage: https://github.com/holidays/holidays
379
379
  licenses:
380
380
  - MIT
381
381
  metadata: {}
382
- post_install_message:
382
+ post_install_message:
383
383
  rdoc_options: []
384
384
  require_paths:
385
385
  - lib
@@ -394,8 +394,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
394
394
  - !ruby/object:Gem::Version
395
395
  version: '0'
396
396
  requirements: []
397
- rubygems_version: 3.1.2
398
- signing_key:
397
+ rubygems_version: 3.0.3
398
+ signing_key:
399
399
  specification_version: 4
400
400
  summary: A collection of Ruby methods to deal with statutory and other holidays.
401
401
  test_files: