holidays 8.4.1 → 8.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/lib/generated_definitions/ar.rb +27 -8
  4. data/lib/generated_definitions/au.rb +16 -4
  5. data/lib/generated_definitions/ca.rb +8 -4
  6. data/lib/generated_definitions/europe.rb +11 -2
  7. data/lib/generated_definitions/federalreserve.rb +1 -0
  8. data/lib/generated_definitions/federalreservebanks.rb +1 -0
  9. data/lib/generated_definitions/gb.rb +7 -2
  10. data/lib/generated_definitions/lv.rb +4 -1
  11. data/lib/generated_definitions/mx.rb +1 -1
  12. data/lib/generated_definitions/northamerica.rb +9 -4
  13. data/lib/generated_definitions/nyse.rb +1 -0
  14. data/lib/generated_definitions/nz.rb +39 -1
  15. data/lib/generated_definitions/rs_cyrl.rb +1 -1
  16. data/lib/generated_definitions/rs_la.rb +1 -1
  17. data/lib/generated_definitions/si.rb +2 -1
  18. data/lib/generated_definitions/southamerica.rb +25 -6
  19. data/lib/generated_definitions/us.rb +1 -0
  20. data/lib/generated_definitions/za.rb +1 -1
  21. data/lib/holidays/version.rb +1 -1
  22. data/test/defs/test_defs_ar.rb +20 -4
  23. data/test/defs/test_defs_au.rb +18 -0
  24. data/test/defs/test_defs_ca.rb +20 -11
  25. data/test/defs/test_defs_europe.rb +24 -0
  26. data/test/defs/test_defs_federalreserve.rb +6 -0
  27. data/test/defs/test_defs_federalreservebanks.rb +4 -0
  28. data/test/defs/test_defs_gb.rb +18 -0
  29. data/test/defs/test_defs_lv.rb +6 -0
  30. data/test/defs/test_defs_mx.rb +2 -0
  31. data/test/defs/test_defs_northamerica.rb +26 -11
  32. data/test/defs/test_defs_nyse.rb +7 -0
  33. data/test/defs/test_defs_nz.rb +4 -0
  34. data/test/defs/test_defs_rs_cyrl.rb +1 -1
  35. data/test/defs/test_defs_rs_la.rb +1 -1
  36. data/test/defs/test_defs_southamerica.rb +20 -4
  37. data/test/defs/test_defs_us.rb +4 -0
  38. data/test/integration/test_holidays.rb +2 -2
  39. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 52c9a215e254d58739f7d8a48d4e1c4057ce10fa146604ed10dd062155103ed1
4
- data.tar.gz: 0b5c0c77a7dc1135b516ae88196db1def87813f29d69dcbf15f787d75aee2363
3
+ metadata.gz: 9eb1a9a2387a3734d10203b125345004d0c470ccc2394b82e36f57277a487db0
4
+ data.tar.gz: 9a77c89d65379366e70b9d6e3eed67080ce5fadb096c11dad1b5edb81dee2e8c
5
5
  SHA512:
6
- metadata.gz: b6534de20527e1359dfa809b3cdfd4bb9f1a8b4b2ea6fb5593ff28c0d875b8b271bc2009a308d3ee03b936ab6d56e02be82c1b675859f22cedbd69be42ac0790
7
- data.tar.gz: c6ca55b847d05375cc6f4d90046d84d2afce8a93b3e4598ca5be36c01a6c9ef0fa68c98f6a2540d1a04fd8071d1073aa5dece5deb033ee725c41d96f3ba9e805
6
+ metadata.gz: 5580b2c4ed9f227fc68558382fa2635df1fb234291b7bd554f3675bea59cf81345be20de1cc7fa8babb9cd445cf1d076dde9eebed1947d75a5a956fdf2ae2158
7
+ data.tar.gz: 210b384735179c141e9c15d0de847449a3e70cd7e468453afd9b038afced110c1ea957b69d48e1196e524a2da3804af1d3502558407f4a9b71e998fb9ae3da64
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
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
+
8
+ ## 8.5.0
9
+
10
+ * Update submodule definitions.
11
+ * Thanks to contributors!!
12
+
3
13
  ## 8.4.1
4
14
 
5
15
  * Fix jp holidays from 2022.
@@ -19,22 +19,41 @@ module Holidays
19
19
  3 => [{:mday => 24, :name => "Día Nacional de la Memoria por la Verdad y la Justicia", :regions => [:ar]}],
20
20
  4 => [{:mday => 2, :name => "Día del Veterano y de los Caídos en la Guerra de Malvinas", :regions => [:ar]}],
21
21
  5 => [{:mday => 1, :name => "Día del Trabajador", :regions => [:ar]},
22
- {:mday => 25, :name => "Día de la Revolución de Mayo", :regions => [:ar]}],
23
- 6 => [{:mday => 20, :name => "Día de la Bandera", :regions => [:ar]}],
24
- 7 => [{:mday => 8, :name => "Feriado puente turístico", :regions => [:ar]},
22
+ {:mday => 25, :name => "Día de la Revolución de Mayo", :regions => [:ar]},
23
+ {:mday => 24, :year_ranges => { :limited => [2021] },:name => "Feriado con fines turísticos", :regions => [:ar]}],
24
+ 6 => [{:mday => 17, :function => "to_nearest_monday(date)", :function_arguments => [:date], :name => "Paso a la Inmortalidad del General Martín Miguel de Güemes", :regions => [:ar]},
25
+ {:mday => 20, :name => "Día de la Bandera", :regions => [:ar]}],
26
+ 7 => [{:mday => 8, :year_ranges => { :limited => [2016] },:name => "Feriado con fines turísticos", :regions => [:ar]},
25
27
  {:mday => 9, :name => "Día de la Independencia", :regions => [:ar]}],
26
- 8 => [{:mday => 15, :name => "Paso a la Inmortalidad del General José de San Martín", :regions => [:ar]}],
27
- 10 => [{:mday => 12, :name => "Día del Respeto a la Diversidad Cultural", :regions => [:ar]}],
28
- 11 => [{:mday => 20, :name => "Día de la Soberanía Nacional", :regions => [:ar]}],
28
+ 8 => [{:mday => 17, :function => "to_nearest_monday(date)", :function_arguments => [:date], :name => "Paso a la Inmortalidad del General José de San Martín", :regions => [:ar]}],
29
+ 10 => [{:mday => 12, :function => "to_nearest_monday(date)", :function_arguments => [:date], :name => "Día del Respeto a la Diversidad Cultural", :regions => [:ar]},
30
+ {:mday => 8, :year_ranges => { :limited => [2021] },:name => "Feriado con fines turísticos", :regions => [:ar]}],
31
+ 11 => [{:mday => 20, :name => "Día de la Soberanía Nacional", :regions => [:ar]},
32
+ {:mday => 22, :year_ranges => { :limited => [2021] },:name => "Feriado con fines turísticos", :regions => [:ar]}],
29
33
  12 => [{:mday => 8, :name => "Inmaculada Concepción de María", :regions => [:ar]},
30
- {:mday => 9, :name => "Feriado puente turístico", :regions => [:ar]},
34
+ {:mday => 9, :year_ranges => { :limited => [2016] },:name => "Feriado con fines turísticos", :regions => [:ar]},
31
35
  {:mday => 25, :name => "Navidad", :regions => [:ar]}]
32
36
  }
33
37
  end
34
38
 
35
39
  def self.custom_methods
36
40
  {
37
-
41
+ "to_nearest_monday(date)" => Proc.new { |date|
42
+ case date.wday
43
+ when 5
44
+ date += 3
45
+ when 4
46
+ date += 4
47
+ when 3
48
+ date -= 2
49
+ when 2
50
+ date -= 1
51
+ end
52
+
53
+ date
54
+ },
55
+
56
+
38
57
  }
39
58
  end
40
59
  end
@@ -26,8 +26,8 @@ module Holidays
26
26
  {:wday => 1, :week => 2, :name => "Labour Day", :regions => [:au_vic]},
27
27
  {:function => "march_pub_hol_sa(year)", :function_arguments => [:year], :name => "March Public Holiday", :regions => [:au_sa]},
28
28
  {:wday => 1, :week => 2, :name => "Canberra Day", :regions => [:au_act]}],
29
- 4 => [{:mday => 25, :name => "ANZAC Day", :regions => [:au]},
30
- {:mday => 25, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "ANZAC Day", :regions => [:au_nsw, :au_vic, :au_qld, :au_nt, :au_act, :au_sa, :au_tas]},
29
+ 4 => [{:mday => 25, :name => "ANZAC Day", :regions => [:au, :au_vic]},
30
+ {:mday => 25, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "ANZAC Day", :regions => [:au_nsw, :au_qld, :au_nt, :au_act, :au_sa, :au_tas]},
31
31
  {:mday => 25, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "ANZAC Day", :regions => [:au_wa]}],
32
32
  5 => [{:function => "qld_labour_day_may(year)", :function_arguments => [:year], :name => "Labour Day", :regions => [:au_qld]},
33
33
  {:wday => 1, :week => 1, :name => "May Day", :regions => [:au_nt]},
@@ -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
@@ -52,13 +52,17 @@ module Holidays
52
52
  {:wday => 1, :week => 1, :name => "New Brunswick Day", :regions => [:ca_nb]},
53
53
  {:wday => 1, :week => 1, :type => :informal, :name => "Terry Fox Day", :regions => [:ca_mb]},
54
54
  {:wday => 1, :week => 3, :name => "Discovery Day", :regions => [:ca_yt]}],
55
- 9 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:ca]}],
55
+ 9 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:ca]},
56
+ {:mday => 30, :year_ranges => { :from => 2021 },:name => "National Day for Truth and Reconciliation", :regions => [:ca]}],
56
57
  10 => [{:wday => 1, :week => 2, :name => "Thanksgiving", :regions => [:ca_ab, :ca_bc, :ca_mb, :ca_nt, :ca_nu, :ca_on, :ca_qc, :ca_sk, :ca_yt]},
57
58
  {:mday => 31, :type => :informal, :name => "Halloween", :regions => [:us, :ca]}],
58
59
  11 => [{:mday => 11, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Remembrance Day", :regions => [:ca_ab, :ca_sk, :ca_bc, :ca_pe, :ca_nl, :ca_nt, :ca_nu, :ca_nb, :ca_yt]}],
59
- 12 => [{:mday => 25, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca]},
60
- {:mday => 26, :observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:ca_on]},
61
- {:mday => 26, :observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :type => :informal, :name => "Boxing Day", :regions => [:ca_ab, :ca_bc, :ca_mb, :ca_nb, :ca_nl, :ca_nt, :ca_ns, :ca_nu, :ca_pe, :ca_sk, :ca_yt]}],
60
+ 12 => [{:mday => 25, :year_ranges => { :until => 2020 },:observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca_on]},
61
+ {:mday => 25, :year_ranges => { :from => 2020 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca_on]},
62
+ {:mday => 25, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca_ab, :ca_bc, :ca_mb, :ca_nb, :ca_nl, :ca_nt, :ca_ns, :ca_nu, :ca_pe, :ca_qc, :ca_sk, :ca_yt]},
63
+ {:mday => 26, :year_ranges => { :until => 2020 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:ca_on]},
64
+ {:mday => 26, :year_ranges => { :from => 2020 },:observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:ca_on]},
65
+ {:mday => 26, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :type => :informal, :name => "Boxing Day", :regions => [:ca_ab, :ca_bc, :ca_mb, :ca_nb, :ca_nl, :ca_nt, :ca_ns, :ca_nu, :ca_pe, :ca_qc, :ca_sk, :ca_yt]}],
62
66
  4 => [{:mday => 1, :type => :informal, :name => "April Fool's Day", :regions => [:us, :ca]},
63
67
  {:mday => 22, :type => :informal, :name => "Earth Day", :regions => [:us, :ca]}]
64
68
  }
@@ -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]},
@@ -227,7 +229,8 @@ module Holidays
227
229
  {:mday => 8, :year_ranges => { :limited => [2020] },:name => "May Day", :regions => [:gb]},
228
230
  {:wday => 1, :week => 1, :year_ranges => { :from => 2021 },:name => "May Day", :regions => [:gb]},
229
231
  {:mday => 9, :name => "Liberation Day", :regions => [:je, :gb_jsy, :gg, :gb_gsy]},
230
- {:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb]},
232
+ {:wday => 1, :week => -1, :year_ranges => { :until => 2021 },:name => "Bank Holiday", :regions => [:gb]},
233
+ {:wday => 1, :week => -1, :year_ranges => { :from => 2023 },:name => "Bank Holiday", :regions => [:gb]},
231
234
  {:mday => 1, :name => "Praznik rada", :regions => [:hr]},
232
235
  {:mday => 30, :year_ranges => { :from => 2020 },:name => "Dan državnosti", :regions => [:hr]},
233
236
  {:mday => 1, :name => "A munka ünnepe", :regions => [:hu]},
@@ -482,6 +485,8 @@ module Holidays
482
485
  {:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de la Región de Murcia", :regions => [:es_mu]},
483
486
  {:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de La Rioja", :regions => [:es_lo]},
484
487
  {:mday => 24, :name => "San Juan", :regions => [:es_ct, :es_vc]},
488
+ {:mday => 2, :year_ranges => { :limited => [2022] },:name => "Bank Holiday", :regions => [:gb]},
489
+ {:mday => 3, :year_ranges => { :limited => [2022] },:name => "Platinum Jubilee", :regions => [:gb]},
485
490
  {:mday => 22, :name => "Dan antifašističke borbe", :regions => [:hr]},
486
491
  {:mday => 25, :year_ranges => { :until => 2019 },:name => "Dan državnosti", :regions => [:hr]},
487
492
  {:wday => 1, :week => 1, :name => "June Bank Holiday", :regions => [:ie]},
@@ -509,6 +514,7 @@ module Holidays
509
514
  {:mday => 8, :name => "Día de Extremadura", :regions => [:es_ex]},
510
515
  {:mday => 11, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Fiesta Nacional de Cataluña", :regions => [:es_ct]},
511
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]},
512
518
  {:mday => 8, :name => "Festa della Madonna di Monte Berico", :regions => [:it_vi]},
513
519
  {:mday => 8, :name => "Maria Geburt", :regions => [:li]},
514
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]},
@@ -602,8 +608,11 @@ when 2018
602
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")
603
609
  Date.new(2018, 7, 8)
604
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
605
614
  # Event's period/next year is known, but precise dates aren't.
606
- # 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.
607
616
  end
608
617
  },
609
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,6 +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_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Juneteenth National Independence Day", :regions => [:federalreservebanks]}],
19
20
  7 => [{:mday => 4, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Independence Day", :regions => [:federalreservebanks]}],
20
21
  9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:federalreservebanks]}],
21
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]},
@@ -23,11 +24,15 @@ module Holidays
23
24
  {:mday => 8, :year_ranges => { :limited => [2020] },:name => "May Day", :regions => [:gb]},
24
25
  {:wday => 1, :week => 1, :year_ranges => { :from => 2021 },:name => "May Day", :regions => [:gb]},
25
26
  {:mday => 9, :name => "Liberation Day", :regions => [:je, :gb_jsy, :gg, :gb_gsy]},
26
- {:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb]}],
27
+ {:wday => 1, :week => -1, :year_ranges => { :until => 2021 },:name => "Bank Holiday", :regions => [:gb]},
28
+ {:wday => 1, :week => -1, :year_ranges => { :from => 2023 },:name => "Bank Holiday", :regions => [:gb]}],
29
+ 6 => [{:mday => 2, :year_ranges => { :limited => [2022] },:name => "Bank Holiday", :regions => [:gb]},
30
+ {:mday => 3, :year_ranges => { :limited => [2022] },:name => "Platinum Jubilee", :regions => [:gb]}],
27
31
  7 => [{:mday => 5, :name => "Tynwald Day", :regions => [:im, :gb_iom]},
28
32
  {:mday => 12, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Battle of the Boyne", :regions => [:gb_nir]}],
29
33
  8 => [{:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:gb_sct]},
30
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]}],
31
36
  11 => [{:mday => 5, :type => :informal, :name => "Guy Fawkes Day", :regions => [:gb]},
32
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]},
33
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]}],
@@ -74,6 +74,7 @@ module Holidays
74
74
  {:wday => 1, :week => 1, :name => "Jefferson Davis' Birthday", :regions => [:us_al]},
75
75
  {:mday => 3, :name => "Birthday of Jefferson Davis", :regions => [:us_fl]},
76
76
  {:mday => 11, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "King Kamehameha I Day", :regions => [:us_hi]},
77
+ {:mday => 19, :year_ranges => { :from => 2021 },:observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Juneteenth National Independence Day", :regions => [:us]},
77
78
  {:mday => 19, :name => "Emancipation Day in Texas", :regions => [:us_tx]},
78
79
  {:mday => 20, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "West Virginia Day", :regions => [:us_wv]},
79
80
  {:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
@@ -98,7 +99,8 @@ module Holidays
98
99
  {:wday => 5, :week => 3, :name => "Statehood Day", :regions => [:us_hi]},
99
100
  {:mday => 27, :name => "Lyndon Baines Johnson Day", :regions => [:us_tx]}],
100
101
  9 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:ca]},
101
- {:mday => 15, :name => "Grito de Dolores", :regions => [:mx]},
102
+ {:mday => 30, :year_ranges => { :from => 2021 },:name => "National Day for Truth and Reconciliation", :regions => [:ca]},
103
+ {:mday => 15, :type => :informal, :name => "Grito de Dolores", :regions => [:mx]},
102
104
  {:mday => 16, :name => "Día de la Independencia", :regions => [:mx]},
103
105
  {:wday => 1, :week => 1, :name => "Labor Day", :regions => [:us]},
104
106
  {:function => "rosh_hashanah(year)", :function_arguments => [:year], :name => "Rosh Hashanah", :regions => [:us_tx]},
@@ -123,9 +125,12 @@ module Holidays
123
125
  {:function => "day_after_thanksgiving(year)", :function_arguments => [:year], :name => "Lincoln's Birthday", :regions => [:us_in]},
124
126
  {:function => "day_after_thanksgiving(year)", :function_arguments => [:year], :name => "American Indian Heritage Day", :regions => [:us_md]},
125
127
  {:function => "day_after_thanksgiving(year)", :function_arguments => [:year], :name => "Day after Thanksgiving (Black Friday)", :regions => [:us_ca, :us_de, :us_fl, :us_ia, :us_il, :us_ks, :us_ky, :us_me, :us_mi, :us_mn, :us_ms, :us_ne, :us_nh, :us_nc, :us_pa, :us_sc, :us_ok, :us_tn, :us_tx, :us_va, :us_wa, :us_wv]}],
126
- 12 => [{:mday => 25, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca]},
127
- {:mday => 26, :observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:ca_on]},
128
- {:mday => 26, :observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :type => :informal, :name => "Boxing Day", :regions => [:ca_ab, :ca_bc, :ca_mb, :ca_nb, :ca_nl, :ca_nt, :ca_ns, :ca_nu, :ca_pe, :ca_sk, :ca_yt]},
128
+ 12 => [{:mday => 25, :year_ranges => { :until => 2020 },:observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca_on]},
129
+ {:mday => 25, :year_ranges => { :from => 2020 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca_on]},
130
+ {:mday => 25, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:ca_ab, :ca_bc, :ca_mb, :ca_nb, :ca_nl, :ca_nt, :ca_ns, :ca_nu, :ca_pe, :ca_qc, :ca_sk, :ca_yt]},
131
+ {:mday => 26, :year_ranges => { :until => 2020 },:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:ca_on]},
132
+ {:mday => 26, :year_ranges => { :from => 2020 },:observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "Boxing Day", :regions => [:ca_on]},
133
+ {:mday => 26, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :type => :informal, :name => "Boxing Day", :regions => [:ca_ab, :ca_bc, :ca_mb, :ca_nb, :ca_nl, :ca_nt, :ca_ns, :ca_nu, :ca_pe, :ca_qc, :ca_sk, :ca_yt]},
129
134
  {:mday => 12, :type => :informal, :name => "Día de la Virgen de Guadalupe", :regions => [:mx]},
130
135
  {:mday => 24, :type => :informal, :name => "Nochebuena", :regions => [:mx]},
131
136
  {:mday => 25, :name => "Navidad", :regions => [:mx]},
@@ -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]},
@@ -50,6 +50,7 @@ module Holidays
50
50
  {:mday => 19, :name => "Declaración Independencia", :regions => [:ve]}],
51
51
  5 => [{:mday => 1, :name => "Día del Trabajador", :regions => [:ar]},
52
52
  {:mday => 25, :name => "Día de la Revolución de Mayo", :regions => [:ar]},
53
+ {:mday => 24, :year_ranges => { :limited => [2021] },:name => "Feriado con fines turísticos", :regions => [:ar]},
53
54
  {:mday => 1, :name => "Dia do Trabalho", :regions => [:br]},
54
55
  {:mday => 1, :name => "Día del Trabajo", :regions => [:cl]},
55
56
  {:mday => 21, :name => "Día de las Glorias Navales", :regions => [:cl]},
@@ -57,7 +58,8 @@ module Holidays
57
58
  {:mday => 1, :name => "Día del Trabajador", :regions => [:pe]},
58
59
  {:wday => 0, :week => 2, :type => :informal, :name => "Día de la Madre", :regions => [:pe]},
59
60
  {:mday => 1, :name => "Día del Trabajador", :regions => [:ve]}],
60
- 6 => [{:mday => 20, :name => "Día de la Bandera", :regions => [:ar]},
61
+ 6 => [{:mday => 17, :function => "to_nearest_monday(date)", :function_arguments => [:date], :name => "Paso a la Inmortalidad del General Martín Miguel de Güemes", :regions => [:ar]},
62
+ {:mday => 20, :name => "Día de la Bandera", :regions => [:ar]},
61
63
  {:mday => 29, :year_ranges => { :until => 1999 },:name => "San Pedro y San Pablo", :regions => [:cl]},
62
64
  {:function => "saint_peter_and_saint_paul(year)", :function_arguments => [:year], :name => "San Pedro y San Pablo", :regions => [:co]},
63
65
  {:mday => 7, :type => :informal, :name => "Día de la Bandera", :regions => [:pe]},
@@ -65,7 +67,7 @@ module Holidays
65
67
  {:mday => 24, :type => :informal, :name => "Inti Raymi", :regions => [:pe]},
66
68
  {:mday => 29, :name => "San Pablo y San Pedro", :regions => [:pe]},
67
69
  {:mday => 24, :name => "Aniversario Batalla de Carabobo", :regions => [:ve]}],
68
- 7 => [{:mday => 8, :name => "Feriado puente turístico", :regions => [:ar]},
70
+ 7 => [{:mday => 8, :year_ranges => { :limited => [2016] },:name => "Feriado con fines turísticos", :regions => [:ar]},
69
71
  {:mday => 9, :name => "Día de la Independencia", :regions => [:ar]},
70
72
  {:mday => 16, :name => "Día de la Virgen del Carmen", :regions => [:cl]},
71
73
  {:mday => 20, :name => "Día de la Independencia", :regions => [:co]},
@@ -73,12 +75,13 @@ module Holidays
73
75
  {:mday => 29, :name => "Segundo Día de la Independencia", :regions => [:pe]},
74
76
  {:mday => 5, :name => "Día de la Independencia", :regions => [:ve]},
75
77
  {:mday => 24, :name => "Natalicio de Simón Bolívar", :regions => [:ve]}],
76
- 8 => [{:mday => 15, :name => "Paso a la Inmortalidad del General José de San Martín", :regions => [:ar]},
78
+ 8 => [{:mday => 17, :function => "to_nearest_monday(date)", :function_arguments => [:date], :name => "Paso a la Inmortalidad del General José de San Martín", :regions => [:ar]},
77
79
  {:mday => 15, :name => "Asunción de la Virgen", :regions => [:cl]},
78
80
  {:mday => 7, :name => "Batalla de Boyacá", :regions => [:co]},
79
81
  {:function => "assumption_of_mary(year)", :function_arguments => [:year], :name => "La Asunción de la Virgen", :regions => [:co]},
80
82
  {:mday => 30, :name => "Santa Rosa de Lima", :regions => [:pe]}],
81
- 10 => [{:mday => 12, :name => "Día del Respeto a la Diversidad Cultural", :regions => [:ar]},
83
+ 10 => [{:mday => 12, :function => "to_nearest_monday(date)", :function_arguments => [:date], :name => "Día del Respeto a la Diversidad Cultural", :regions => [:ar]},
84
+ {:mday => 8, :year_ranges => { :limited => [2021] },:name => "Feriado con fines turísticos", :regions => [:ar]},
82
85
  {:mday => 12, :name => "Dia de Nossa Senhora Aparecida", :regions => [:br]},
83
86
  {:mday => 12, :year_ranges => { :until => 1999 },:name => "Encuentro de Dos Mundos", :regions => [:cl]},
84
87
  {:function => "columbus_day_cl(year)", :function_arguments => [:year], :year_ranges => { :from => 2000 },:name => "Encuentro de Dos Mundos", :regions => [:cl]},
@@ -86,6 +89,7 @@ module Holidays
86
89
  {:mday => 8, :name => "Batalla de Angamos", :regions => [:pe]},
87
90
  {:mday => 12, :name => "Día de la Resistencia Indígena", :regions => [:ve]}],
88
91
  11 => [{:mday => 20, :name => "Día de la Soberanía Nacional", :regions => [:ar]},
92
+ {:mday => 22, :year_ranges => { :limited => [2021] },:name => "Feriado con fines turísticos", :regions => [:ar]},
89
93
  {:mday => 2, :name => "Dia de Finados", :regions => [:br]},
90
94
  {:mday => 15, :name => "Proclamação da República", :regions => [:br]},
91
95
  {:mday => 1, :name => "Día de Todos los Santos", :regions => [:cl]},
@@ -93,7 +97,7 @@ module Holidays
93
97
  {:function => "independence_of_cartagena(year)", :function_arguments => [:year], :name => "Independencia de Cartagena", :regions => [:co]},
94
98
  {:mday => 1, :name => "Todos los Santos", :regions => [:pe]}],
95
99
  12 => [{:mday => 8, :name => "Inmaculada Concepción de María", :regions => [:ar]},
96
- {:mday => 9, :name => "Feriado puente turístico", :regions => [:ar]},
100
+ {:mday => 9, :year_ranges => { :limited => [2016] },:name => "Feriado con fines turísticos", :regions => [:ar]},
97
101
  {:mday => 25, :name => "Navidad", :regions => [:ar]},
98
102
  {:mday => 25, :name => "Natal", :regions => [:br]},
99
103
  {:mday => 8, :name => "Inmaculada Concepción de María", :regions => [:cl]},
@@ -112,7 +116,22 @@ module Holidays
112
116
 
113
117
  def self.custom_methods
114
118
  {
115
- "st_peter_st_paul_cl(year)" => Proc.new { |year|
119
+ "to_nearest_monday(date)" => Proc.new { |date|
120
+ case date.wday
121
+ when 5
122
+ date += 3
123
+ when 4
124
+ date += 4
125
+ when 3
126
+ date -= 2
127
+ when 2
128
+ date -= 1
129
+ end
130
+
131
+ date
132
+ },
133
+
134
+ "st_peter_st_paul_cl(year)" => Proc.new { |year|
116
135
  date = Date.civil(year, 6, 29)
117
136
  if [2,3,4].include?(date.wday)
118
137
  date -= (date.wday - 1)
@@ -51,6 +51,7 @@ module Holidays
51
51
  6 => [{:wday => 1, :week => 1, :name => "Jefferson Davis' Birthday", :regions => [:us_al]},
52
52
  {:mday => 3, :name => "Birthday of Jefferson Davis", :regions => [:us_fl]},
53
53
  {:mday => 11, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "King Kamehameha I Day", :regions => [:us_hi]},
54
+ {:mday => 19, :year_ranges => { :from => 2021 },:observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Juneteenth National Independence Day", :regions => [:us]},
54
55
  {:mday => 19, :name => "Emancipation Day in Texas", :regions => [:us_tx]},
55
56
  {:mday => 20, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "West Virginia Day", :regions => [:us_wv]},
56
57
  {:wday => 0, :week => 3, :type => :informal, :name => "Father's Day", :regions => [:us, :ca]}],
@@ -23,7 +23,7 @@ module Holidays
23
23
  9 => [{:mday => 24, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Heritage Day", :regions => [:za]}],
24
24
  12 => [{:mday => 16, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Day of Reconciliation", :regions => [:za]},
25
25
  {:mday => 25, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:za]},
26
- {:mday => 26, :observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "Day of Goodwill", :regions => [:za]}]
26
+ {:mday => 26, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Day of Goodwill", :regions => [:za]}]
27
27
  }
28
28
  end
29
29
 
@@ -1,3 +1,3 @@
1
1
  module Holidays
2
- VERSION = '8.4.1'
2
+ VERSION = '8.6.0'
3
3
  end
@@ -31,21 +31,37 @@ class ArDefinitionTests < Test::Unit::TestCase # :nodoc:
31
31
 
32
32
  assert_equal "Día de la Revolución de Mayo", (Holidays.on(Date.civil(2016, 5, 25), [:ar], [:informal])[0] || {})[:name]
33
33
 
34
- assert_equal "Día de la Bandera", (Holidays.on(Date.civil(2016, 6, 20), [:ar], [:informal])[0] || {})[:name]
34
+ assert_equal "Paso a la Inmortalidad del General Martín Miguel de Güemes", (Holidays.on(Date.civil(2020, 6, 15), [:ar], [:informal])[0] || {})[:name]
35
+ assert_equal "Paso a la Inmortalidad del General Martín Miguel de Güemes", (Holidays.on(Date.civil(2021, 6, 21), [:ar], [:informal])[0] || {})[:name]
35
36
 
36
- assert_equal "Feriado puente turístico", (Holidays.on(Date.civil(2016, 7, 8), [:ar], [:informal])[0] || {})[:name]
37
+ assert_nil (Holidays.on(Date.civil(2020, 6, 17), [:ar], [:informal])[0] || {})[:name]
38
+ assert_nil (Holidays.on(Date.civil(2021, 6, 17), [:ar], [:informal])[0] || {})[:name]
39
+
40
+ assert_equal "Paso a la Inmortalidad del General Martín Miguel de Güemes", (Holidays.on(Date.civil(2016, 6, 20), [:ar], [:informal])[0] || {})[:name]
37
41
 
38
42
  assert_equal "Día de la Independencia", (Holidays.on(Date.civil(2016, 7, 9), [:ar], [:informal])[0] || {})[:name]
39
43
 
40
44
  assert_equal "Paso a la Inmortalidad del General José de San Martín", (Holidays.on(Date.civil(2016, 8, 15), [:ar], [:informal])[0] || {})[:name]
45
+ assert_equal "Paso a la Inmortalidad del General José de San Martín", (Holidays.on(Date.civil(2020, 8, 17), [:ar], [:informal])[0] || {})[:name]
46
+ assert_equal "Paso a la Inmortalidad del General José de San Martín", (Holidays.on(Date.civil(2021, 8, 16), [:ar], [:informal])[0] || {})[:name]
47
+
48
+ assert_nil (Holidays.on(Date.civil(2016, 8, 17), [:ar], [:informal])[0] || {})[:name]
49
+ assert_nil (Holidays.on(Date.civil(2021, 8, 17), [:ar], [:informal])[0] || {})[:name]
50
+
51
+ assert_equal "Día del Respeto a la Diversidad Cultural", (Holidays.on(Date.civil(2016, 10, 10), [:ar], [:informal])[0] || {})[:name]
52
+ assert_equal "Día del Respeto a la Diversidad Cultural", (Holidays.on(Date.civil(2021, 10, 11), [:ar], [:informal])[0] || {})[:name]
41
53
 
42
- assert_equal "Día del Respeto a la Diversidad Cultural", (Holidays.on(Date.civil(2016, 10, 12), [:ar], [:informal])[0] || {})[:name]
54
+ assert_nil (Holidays.on(Date.civil(2021, 10, 12), [:ar], [:informal])[0] || {})[:name]
43
55
 
44
56
  assert_equal "Día de la Soberanía Nacional", (Holidays.on(Date.civil(2016, 11, 20), [:ar], [:informal])[0] || {})[:name]
45
57
 
46
58
  assert_equal "Inmaculada Concepción de María", (Holidays.on(Date.civil(2016, 12, 8), [:ar], [:informal])[0] || {})[:name]
47
59
 
48
- assert_equal "Feriado puente turístico", (Holidays.on(Date.civil(2016, 12, 9), [:ar], [:informal])[0] || {})[:name]
60
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2016, 7, 8), [:ar], [:informal])[0] || {})[:name]
61
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2016, 12, 9), [:ar], [:informal])[0] || {})[:name]
62
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2021, 5, 24), [:ar], [:informal])[0] || {})[:name]
63
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2021, 10, 8), [:ar], [:informal])[0] || {})[:name]
64
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2021, 11, 22), [:ar], [:informal])[0] || {})[:name]
49
65
 
50
66
  assert_equal "Navidad", (Holidays.on(Date.civil(2016, 12, 25), [:ar], [:informal])[0] || {})[:name]
51
67
 
@@ -196,5 +196,23 @@ assert_equal "Queen's Birthday", (Holidays.on(Date.civil(2016, 9, 26), [:au_wa])
196
196
 
197
197
  assert_equal "G20 Day", (Holidays.on(Date.civil(2014, 11, 14), [:au_qld_brisbane])[0] || {})[:name]
198
198
 
199
+ assert_nil (Holidays.on(Date.civil(2021, 4, 26), [:au_vic])[0] || {})[:name]
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
+
199
217
  end
200
218
  end
@@ -19,7 +19,7 @@ class CaDefinitionTests < Test::Unit::TestCase # :nodoc:
19
19
 
20
20
  assert_equal "Labour Day", (Holidays.on(Date.civil(2008, 9, 1), [:ca], [:informal])[0] || {})[:name]
21
21
 
22
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2008, 12, 25), [:ca], [:informal])[0] || {})[:name]
22
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2008, 12, 25), [:ca_on], [:informal])[0] || {})[:name]
23
23
 
24
24
  assert_equal "Family Day", (Holidays.on(Date.civil(1990, 2, 19), [:ca_ab])[0] || {})[:name]
25
25
 
@@ -201,28 +201,37 @@ assert_equal "Remembrance Day", (Holidays.on(Date.civil(2017, 11, 13), [:ca_ab,
201
201
 
202
202
  assert_equal "Canada Day", (Holidays.on(Date.civil(2017, 7, 3), [:ca], [:observed])[0] || {})[:name]
203
203
 
204
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 25), [:ca])[0] || {})[:name]
204
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2021, 9, 30), [:ca])[0] || {})[:name]
205
205
 
206
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2018, 12, 25), [:ca])[0] || {})[:name]
206
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2026, 9, 30), [:ca])[0] || {})[:name]
207
207
 
208
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 25), [:ca])[0] || {})[:name]
208
+ assert_nil (Holidays.on(Date.civil(2020, 9, 30), [:ca])[0] || {})[:name]
209
+
210
+ assert_nil (Holidays.on(Date.civil(1985, 9, 30), [:ca])[0] || {})[:name]
211
+
212
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 25), [:ca_on])[0] || {})[:name]
213
+
214
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2018, 12, 25), [:ca_on])[0] || {})[:name]
215
+
216
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 25), [:ca_on])[0] || {})[:name]
209
217
 
210
218
  assert_nil (Holidays.on(Date.civil(2022, 12, 25), [:ca], [:observed])[0] || {})[:name]
211
219
 
212
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 24), [:ca], [:observed])[0] || {})[:name]
220
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 24), [:ca_on], [:observed])[0] || {})[:name]
221
+
222
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2012, 12, 25), [:ca_on], [:observed])[0] || {})[:name]
213
223
 
214
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2012, 12, 25), [:ca], [:observed])[0] || {})[:name]
224
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2016, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
215
225
 
216
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2016, 12, 26), [:ca], [:observed])[0] || {})[:name]
226
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12, 24), [:ca_ab, :ca_bc, :ca_mb, :ca_nb, :ca_nl, :ca_nt, :ca_ns, :ca_nu, :ca_pe, :ca_qc, :ca_sk, :ca_yt], [:observed])[0] || {})[:name]
217
227
 
218
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12, 24), [:ca], [:observed])[0] || {})[:name]
228
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12, 27), [:ca_on], [:observed])[0] || {})[:name]
219
229
 
220
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 26), [:ca], [:observed])[0] || {})[:name]
230
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
221
231
 
222
- assert_equal "Boxing Day", (Holidays.on(Date.civil(2010, 12, 28), [:ca_on], [:observed])[0] || {})[:name]
232
+ assert_equal "Boxing Day", (Holidays.on(Date.civil(2010, 12, 27), [:ca_on], [:observed])[0] || {})[:name]
223
233
  assert_equal "Boxing Day", (Holidays.on(Date.civil(2012, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
224
234
  assert_equal "Boxing Day", (Holidays.on(Date.civil(2015, 12, 28), [:ca_on], [:observed])[0] || {})[:name]
225
- assert_equal "Boxing Day", (Holidays.on(Date.civil(2016, 12, 27), [:ca_on], [:observed])[0] || {})[:name]
226
235
 
227
236
  assert_nil (Holidays.on(Date.civil(2015, 6, 21), [:ca_yt])[0] || {})[:name]
228
237
 
@@ -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]
@@ -577,6 +581,20 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
577
581
 
578
582
  assert_equal "Bank Holiday", (Holidays.on(Date.civil(2018, 8, 27), [:je])[0] || {})[:name]
579
583
 
584
+ assert_equal "Bank Holiday", (Holidays.on(Date.civil(2022, 6, 2), [:gb])[0] || {})[:name]
585
+
586
+ assert_nil (Holidays.on(Date.civil(2022, 5, 30), [:gb])[0] || {})[:name]
587
+
588
+ assert_equal "Platinum Jubilee", (Holidays.on(Date.civil(2022, 6, 3), [:gb])[0] || {})[:name]
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
+
596
+ assert_equal "Bank Holiday", (Holidays.on(Date.civil(2023, 5, 29), [:gb])[0] || {})[:name]
597
+
580
598
  assert_equal "Nova godina", (Holidays.on(Date.civil(2012, 1, 1), [:hr], [:informal])[0] || {})[:name]
581
599
 
582
600
  assert_equal "Bogojavljenje ili Sveta tri kralja", (Holidays.on(Date.civil(2012, 1, 6), [:hr], [:informal])[0] || {})[:name]
@@ -894,11 +912,17 @@ assert_equal "Jāņu diena", (Holidays.on(Date.civil(2020, 6, 24), [:lv])[0] ||
894
912
  assert_equal "Jāņu diena", (Holidays.on(Date.civil(2029, 6, 24), [:lv])[0] || {})[:name]
895
913
 
896
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]
897
916
 
898
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]
899
919
 
900
920
  assert_nil (Holidays.on(Date.civil(2019, 7, 8), [:lv])[0] || {})[:name]
901
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]
902
926
 
903
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]
904
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
@@ -243,5 +243,9 @@ class FederalreservebanksDefinitionTests < Test::Unit::TestCase # :nodoc:
243
243
 
244
244
  assert_equal "Christmas Day", (Holidays.on(Date.civil(2024, 12, 25), [:federalreservebanks], [:observed])[0] || {})[:name]
245
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
+
246
250
  end
247
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]
@@ -129,5 +133,19 @@ class GbDefinitionTests < Test::Unit::TestCase # :nodoc:
129
133
 
130
134
  assert_equal "Bank Holiday", (Holidays.on(Date.civil(2018, 8, 27), [:je])[0] || {})[:name]
131
135
 
136
+ assert_equal "Bank Holiday", (Holidays.on(Date.civil(2022, 6, 2), [:gb])[0] || {})[:name]
137
+
138
+ assert_nil (Holidays.on(Date.civil(2022, 5, 30), [:gb])[0] || {})[:name]
139
+
140
+ assert_equal "Platinum Jubilee", (Holidays.on(Date.civil(2022, 6, 3), [:gb])[0] || {})[:name]
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
+
148
+ assert_equal "Bank Holiday", (Holidays.on(Date.civil(2023, 5, 29), [:gb])[0] || {})[:name]
149
+
132
150
  end
133
151
  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]
@@ -19,7 +19,7 @@ class NorthamericaDefinitionTests < Test::Unit::TestCase # :nodoc:
19
19
 
20
20
  assert_equal "Labour Day", (Holidays.on(Date.civil(2008, 9, 1), [:ca], [:informal])[0] || {})[:name]
21
21
 
22
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2008, 12, 25), [:ca], [:informal])[0] || {})[:name]
22
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2008, 12, 25), [:ca_on], [:informal])[0] || {})[:name]
23
23
 
24
24
  assert_equal "Family Day", (Holidays.on(Date.civil(1990, 2, 19), [:ca_ab])[0] || {})[:name]
25
25
 
@@ -201,28 +201,37 @@ assert_equal "Remembrance Day", (Holidays.on(Date.civil(2017, 11, 13), [:ca_ab,
201
201
 
202
202
  assert_equal "Canada Day", (Holidays.on(Date.civil(2017, 7, 3), [:ca], [:observed])[0] || {})[:name]
203
203
 
204
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 25), [:ca])[0] || {})[:name]
204
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2021, 9, 30), [:ca])[0] || {})[:name]
205
205
 
206
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2018, 12, 25), [:ca])[0] || {})[:name]
206
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2026, 9, 30), [:ca])[0] || {})[:name]
207
207
 
208
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 25), [:ca])[0] || {})[:name]
208
+ assert_nil (Holidays.on(Date.civil(2020, 9, 30), [:ca])[0] || {})[:name]
209
+
210
+ assert_nil (Holidays.on(Date.civil(1985, 9, 30), [:ca])[0] || {})[:name]
211
+
212
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 25), [:ca_on])[0] || {})[:name]
213
+
214
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2018, 12, 25), [:ca_on])[0] || {})[:name]
215
+
216
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 25), [:ca_on])[0] || {})[:name]
209
217
 
210
218
  assert_nil (Holidays.on(Date.civil(2022, 12, 25), [:ca], [:observed])[0] || {})[:name]
211
219
 
212
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 24), [:ca], [:observed])[0] || {})[:name]
220
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 24), [:ca_on], [:observed])[0] || {})[:name]
213
221
 
214
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2012, 12, 25), [:ca], [:observed])[0] || {})[:name]
222
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2012, 12, 25), [:ca_on], [:observed])[0] || {})[:name]
215
223
 
216
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2016, 12, 26), [:ca], [:observed])[0] || {})[:name]
224
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2016, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
217
225
 
218
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12, 24), [:ca], [:observed])[0] || {})[:name]
226
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12, 24), [:ca_ab, :ca_bc, :ca_mb, :ca_nb, :ca_nl, :ca_nt, :ca_ns, :ca_nu, :ca_pe, :ca_qc, :ca_sk, :ca_yt], [:observed])[0] || {})[:name]
219
227
 
220
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 26), [:ca], [:observed])[0] || {})[:name]
228
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12, 27), [:ca_on], [:observed])[0] || {})[:name]
221
229
 
222
- assert_equal "Boxing Day", (Holidays.on(Date.civil(2010, 12, 28), [:ca_on], [:observed])[0] || {})[:name]
230
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
231
+
232
+ assert_equal "Boxing Day", (Holidays.on(Date.civil(2010, 12, 27), [:ca_on], [:observed])[0] || {})[:name]
223
233
  assert_equal "Boxing Day", (Holidays.on(Date.civil(2012, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
224
234
  assert_equal "Boxing Day", (Holidays.on(Date.civil(2015, 12, 28), [:ca_on], [:observed])[0] || {})[:name]
225
- assert_equal "Boxing Day", (Holidays.on(Date.civil(2016, 12, 27), [:ca_on], [:observed])[0] || {})[:name]
226
235
 
227
236
  assert_nil (Holidays.on(Date.civil(2015, 6, 21), [:ca_yt])[0] || {})[:name]
228
237
 
@@ -258,6 +267,8 @@ assert_equal "Boxing Day", (Holidays.on(Date.civil(2016, 12, 27), [:ca_on], [:ob
258
267
 
259
268
  assert_equal "Cinco de Mayo", (Holidays.on(Date.civil(2007, 5, 5), [:mx], [:informal])[0] || {})[:name]
260
269
 
270
+ assert_equal "Grito de Dolores", (Holidays.on(Date.civil(2007, 9, 15), [:mx], [:informal])[0] || {})[:name]
271
+
261
272
  assert_equal "Día de la Independencia", (Holidays.on(Date.civil(2007, 9, 16), [:mx], [:informal])[0] || {})[:name]
262
273
 
263
274
  assert_equal "Todos los Santos", (Holidays.on(Date.civil(2007, 11, 1), [:mx], [:informal])[0] || {})[:name]
@@ -454,6 +465,10 @@ assert_equal "King Kamehameha I Day", (Holidays.on(Date.civil(2022, 6, 10), [:us
454
465
 
455
466
  assert_equal "King Kamehameha I Day", (Holidays.on(Date.civil(2017, 6, 11), [:us_hi])[0] || {})[:name]
456
467
 
468
+ assert_nil (Holidays.on(Date.civil(2021, 6, 19), [:us], [:observed])[0] || {})[:name]
469
+
470
+ assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2021, 6, 18), [:us], [:observed])[0] || {})[:name]
471
+
457
472
  assert_equal "Emancipation Day in Texas", (Holidays.on(Date.civil(2017, 6, 19), [:us_tx])[0] || {})[:name]
458
473
 
459
474
  assert_nil (Holidays.on(Date.civil(2017, 6, 20), [:us])[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
 
@@ -31,21 +31,37 @@ class SouthamericaDefinitionTests < Test::Unit::TestCase # :nodoc:
31
31
 
32
32
  assert_equal "Día de la Revolución de Mayo", (Holidays.on(Date.civil(2016, 5, 25), [:ar], [:informal])[0] || {})[:name]
33
33
 
34
- assert_equal "Día de la Bandera", (Holidays.on(Date.civil(2016, 6, 20), [:ar], [:informal])[0] || {})[:name]
34
+ assert_equal "Paso a la Inmortalidad del General Martín Miguel de Güemes", (Holidays.on(Date.civil(2020, 6, 15), [:ar], [:informal])[0] || {})[:name]
35
+ assert_equal "Paso a la Inmortalidad del General Martín Miguel de Güemes", (Holidays.on(Date.civil(2021, 6, 21), [:ar], [:informal])[0] || {})[:name]
35
36
 
36
- assert_equal "Feriado puente turístico", (Holidays.on(Date.civil(2016, 7, 8), [:ar], [:informal])[0] || {})[:name]
37
+ assert_nil (Holidays.on(Date.civil(2020, 6, 17), [:ar], [:informal])[0] || {})[:name]
38
+ assert_nil (Holidays.on(Date.civil(2021, 6, 17), [:ar], [:informal])[0] || {})[:name]
39
+
40
+ assert_equal "Paso a la Inmortalidad del General Martín Miguel de Güemes", (Holidays.on(Date.civil(2016, 6, 20), [:ar], [:informal])[0] || {})[:name]
37
41
 
38
42
  assert_equal "Día de la Independencia", (Holidays.on(Date.civil(2016, 7, 9), [:ar], [:informal])[0] || {})[:name]
39
43
 
40
44
  assert_equal "Paso a la Inmortalidad del General José de San Martín", (Holidays.on(Date.civil(2016, 8, 15), [:ar], [:informal])[0] || {})[:name]
45
+ assert_equal "Paso a la Inmortalidad del General José de San Martín", (Holidays.on(Date.civil(2020, 8, 17), [:ar], [:informal])[0] || {})[:name]
46
+ assert_equal "Paso a la Inmortalidad del General José de San Martín", (Holidays.on(Date.civil(2021, 8, 16), [:ar], [:informal])[0] || {})[:name]
47
+
48
+ assert_nil (Holidays.on(Date.civil(2016, 8, 17), [:ar], [:informal])[0] || {})[:name]
49
+ assert_nil (Holidays.on(Date.civil(2021, 8, 17), [:ar], [:informal])[0] || {})[:name]
50
+
51
+ assert_equal "Día del Respeto a la Diversidad Cultural", (Holidays.on(Date.civil(2016, 10, 10), [:ar], [:informal])[0] || {})[:name]
52
+ assert_equal "Día del Respeto a la Diversidad Cultural", (Holidays.on(Date.civil(2021, 10, 11), [:ar], [:informal])[0] || {})[:name]
41
53
 
42
- assert_equal "Día del Respeto a la Diversidad Cultural", (Holidays.on(Date.civil(2016, 10, 12), [:ar], [:informal])[0] || {})[:name]
54
+ assert_nil (Holidays.on(Date.civil(2021, 10, 12), [:ar], [:informal])[0] || {})[:name]
43
55
 
44
56
  assert_equal "Día de la Soberanía Nacional", (Holidays.on(Date.civil(2016, 11, 20), [:ar], [:informal])[0] || {})[:name]
45
57
 
46
58
  assert_equal "Inmaculada Concepción de María", (Holidays.on(Date.civil(2016, 12, 8), [:ar], [:informal])[0] || {})[:name]
47
59
 
48
- assert_equal "Feriado puente turístico", (Holidays.on(Date.civil(2016, 12, 9), [:ar], [:informal])[0] || {})[:name]
60
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2016, 7, 8), [:ar], [:informal])[0] || {})[:name]
61
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2016, 12, 9), [:ar], [:informal])[0] || {})[:name]
62
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2021, 5, 24), [:ar], [:informal])[0] || {})[:name]
63
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2021, 10, 8), [:ar], [:informal])[0] || {})[:name]
64
+ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2021, 11, 22), [:ar], [:informal])[0] || {})[:name]
49
65
 
50
66
  assert_equal "Navidad", (Holidays.on(Date.civil(2016, 12, 25), [:ar], [:informal])[0] || {})[:name]
51
67
 
@@ -193,6 +193,10 @@ assert_equal "King Kamehameha I Day", (Holidays.on(Date.civil(2022, 6, 10), [:us
193
193
 
194
194
  assert_equal "King Kamehameha I Day", (Holidays.on(Date.civil(2017, 6, 11), [:us_hi])[0] || {})[:name]
195
195
 
196
+ assert_nil (Holidays.on(Date.civil(2021, 6, 19), [:us], [:observed])[0] || {})[:name]
197
+
198
+ assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2021, 6, 18), [:us], [:observed])[0] || {})[:name]
199
+
196
200
  assert_equal "Emancipation Day in Texas", (Holidays.on(Date.civil(2017, 6, 19), [:us_tx])[0] || {})[:name]
197
201
 
198
202
  assert_nil (Holidays.on(Date.civil(2017, 6, 20), [:us])[0] || {})[:name]
@@ -152,10 +152,10 @@ class HolidaysTests < Test::Unit::TestCase
152
152
  assert_equal 8, holidays.length
153
153
 
154
154
  holidays = Holidays.year_holidays([:ca_on], Date.civil(2020, 1, 1))
155
- assert_equal 9, holidays.length
155
+ assert_equal 11, holidays.length
156
156
 
157
157
  holidays = Holidays.year_holidays([:ca_on], Date.civil(2050, 1, 1))
158
- assert_equal 9, holidays.length
158
+ assert_equal 10, holidays.length
159
159
 
160
160
  holidays = Holidays.year_holidays([:jp], Date.civil(2070, 1, 1))
161
161
  assert_equal 19, holidays.length
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.4.1
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: 2021-01-06 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: