holidays 6.6.1 → 8.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +25 -0
  3. data/CHANGELOG.md +72 -0
  4. data/README.md +10 -6
  5. data/doc/CONTRIBUTING.md +2 -1
  6. data/holidays.gemspec +5 -5
  7. data/lib/generated_definitions/MANIFEST +11 -5
  8. data/lib/generated_definitions/REGIONS.rb +2 -2
  9. data/lib/generated_definitions/ar.rb +28 -9
  10. data/lib/generated_definitions/at.rb +2 -2
  11. data/lib/generated_definitions/au.rb +47 -10
  12. data/lib/generated_definitions/be_fr.rb +2 -2
  13. data/lib/generated_definitions/be_nl.rb +2 -2
  14. data/lib/generated_definitions/bg.rb +2 -2
  15. data/lib/generated_definitions/br.rb +2 -2
  16. data/lib/generated_definitions/ca.rb +25 -17
  17. data/lib/generated_definitions/ch.rb +15 -3
  18. data/lib/generated_definitions/cl.rb +7 -7
  19. data/lib/generated_definitions/co.rb +2 -2
  20. data/lib/generated_definitions/cr.rb +2 -2
  21. data/lib/generated_definitions/cz.rb +2 -2
  22. data/lib/generated_definitions/de.rb +11 -7
  23. data/lib/generated_definitions/dk.rb +3 -3
  24. data/lib/generated_definitions/{ecb_target.rb → ecbtarget.rb} +10 -10
  25. data/lib/generated_definitions/ee.rb +2 -2
  26. data/lib/generated_definitions/el.rb +2 -2
  27. data/lib/generated_definitions/es.rb +6 -4
  28. data/lib/generated_definitions/europe.rb +119 -32
  29. data/lib/generated_definitions/{federal_reserve.rb → federalreserve.rb} +15 -14
  30. data/lib/generated_definitions/federalreservebanks.rb +35 -0
  31. data/lib/generated_definitions/fedex.rb +2 -2
  32. data/lib/generated_definitions/fi.rb +2 -2
  33. data/lib/generated_definitions/fr.rb +4 -4
  34. data/lib/generated_definitions/gb.rb +15 -7
  35. data/lib/generated_definitions/ge.rb +2 -2
  36. data/lib/generated_definitions/hk.rb +2 -2
  37. data/lib/generated_definitions/hr.rb +10 -8
  38. data/lib/generated_definitions/hu.rb +4 -3
  39. data/lib/generated_definitions/ie.rb +2 -2
  40. data/lib/generated_definitions/is.rb +2 -2
  41. data/lib/generated_definitions/it.rb +16 -7
  42. data/lib/generated_definitions/jp.rb +31 -16
  43. data/lib/generated_definitions/kr.rb +2 -2
  44. data/lib/generated_definitions/kz.rb +38 -0
  45. data/lib/generated_definitions/li.rb +2 -2
  46. data/lib/generated_definitions/lt.rb +2 -2
  47. data/lib/generated_definitions/lu.rb +4 -2
  48. data/lib/generated_definitions/lv.rb +56 -0
  49. data/lib/generated_definitions/ma.rb +2 -2
  50. data/lib/generated_definitions/mt_en.rb +2 -2
  51. data/lib/generated_definitions/mt_mt.rb +2 -2
  52. data/lib/generated_definitions/mx.rb +7 -7
  53. data/lib/generated_definitions/my.rb +2 -2
  54. data/lib/generated_definitions/nerc.rb +2 -2
  55. data/lib/generated_definitions/ng.rb +33 -0
  56. data/lib/generated_definitions/nl.rb +2 -2
  57. data/lib/generated_definitions/no.rb +2 -2
  58. data/lib/generated_definitions/{north_america.rb → northamerica.rb} +34 -26
  59. data/lib/generated_definitions/nyse.rb +3 -2
  60. data/lib/generated_definitions/nz.rb +41 -3
  61. data/lib/generated_definitions/pe.rb +2 -2
  62. data/lib/generated_definitions/ph.rb +2 -2
  63. data/lib/generated_definitions/pl.rb +2 -2
  64. data/lib/generated_definitions/pt.rb +2 -2
  65. data/lib/generated_definitions/ro.rb +6 -3
  66. data/lib/generated_definitions/rs_cyrl.rb +3 -3
  67. data/lib/generated_definitions/rs_la.rb +3 -3
  68. data/lib/generated_definitions/ru.rb +2 -2
  69. data/lib/generated_definitions/scandinavia.rb +3 -3
  70. data/lib/generated_definitions/se.rb +2 -2
  71. data/lib/generated_definitions/sg.rb +2 -2
  72. data/lib/generated_definitions/si.rb +4 -3
  73. data/lib/generated_definitions/sk.rb +2 -2
  74. data/lib/generated_definitions/{south_america.rb → southamerica.rb} +32 -13
  75. data/lib/generated_definitions/th.rb +36 -0
  76. data/lib/generated_definitions/tn.rb +2 -2
  77. data/lib/generated_definitions/tr.rb +7 -5
  78. data/lib/generated_definitions/ua.rb +37 -0
  79. data/lib/generated_definitions/{united_nations.rb → unitednations.rb} +61 -61
  80. data/lib/generated_definitions/ups.rb +2 -2
  81. data/lib/generated_definitions/us.rb +9 -9
  82. data/lib/generated_definitions/ve.rb +2 -2
  83. data/lib/generated_definitions/vi.rb +2 -2
  84. data/lib/generated_definitions/za.rb +3 -3
  85. data/lib/holidays/definition/context/generator.rb +23 -70
  86. data/lib/holidays/definition/generator/module.rb +54 -0
  87. data/lib/holidays/definition/generator/regions.rb +1 -1
  88. data/lib/holidays/definition/repository/holidays_by_month.rb +9 -1
  89. data/lib/holidays/factory/definition.rb +7 -0
  90. data/lib/holidays/finder/context/search.rb +35 -31
  91. data/lib/holidays/finder/rules/year_range.rb +30 -54
  92. data/lib/holidays/version.rb +1 -1
  93. data/lib/holidays.rb +2 -0
  94. data/test/coverage_report.rb +23 -5
  95. data/test/data/test_custom_year_range_holiday_defs.yaml +6 -10
  96. data/test/data/test_multiple_regions_with_conflicts_region_1.yaml +38 -0
  97. data/test/data/test_multiple_regions_with_conflicts_region_2.yaml +38 -0
  98. data/test/defs/test_defs_ar.rb +20 -4
  99. data/test/defs/test_defs_au.rb +22 -0
  100. data/test/defs/test_defs_ca.rb +71 -8
  101. data/test/defs/test_defs_ch.rb +4 -0
  102. data/test/defs/test_defs_co.rb +3 -3
  103. data/test/defs/test_defs_de.rb +8 -0
  104. data/test/defs/test_defs_dk.rb +4 -0
  105. data/test/defs/{test_defs_ecb_target.rb → test_defs_ecbtarget.rb} +11 -11
  106. data/test/defs/test_defs_es.rb +2 -0
  107. data/test/defs/test_defs_europe.rb +233 -14
  108. data/test/defs/test_defs_federalreserve.rb +119 -0
  109. data/test/defs/test_defs_federalreservebanks.rb +251 -0
  110. data/test/defs/test_defs_fr.rb +3 -3
  111. data/test/defs/test_defs_gb.rb +42 -0
  112. data/test/defs/test_defs_hr.rb +6 -6
  113. data/test/defs/test_defs_hu.rb +12 -4
  114. data/test/defs/test_defs_it.rb +20 -0
  115. data/test/defs/test_defs_jp.rb +22 -2
  116. data/test/defs/test_defs_kz.rb +39 -0
  117. data/test/defs/test_defs_lu.rb +6 -0
  118. data/test/defs/test_defs_lv.rb +98 -0
  119. data/test/defs/test_defs_mx.rb +3 -1
  120. data/test/defs/test_defs_ng.rb +29 -0
  121. data/test/defs/{test_defs_north_america.rb → test_defs_northamerica.rb} +85 -20
  122. data/test/defs/test_defs_nyse.rb +7 -0
  123. data/test/defs/test_defs_nz.rb +4 -0
  124. data/test/defs/test_defs_ro.rb +14 -0
  125. data/test/defs/test_defs_rs_cyrl.rb +1 -1
  126. data/test/defs/test_defs_rs_la.rb +1 -1
  127. data/test/defs/test_defs_scandinavia.rb +4 -0
  128. data/test/defs/{test_defs_south_america.rb → test_defs_southamerica.rb} +25 -9
  129. data/test/defs/test_defs_th.rb +33 -0
  130. data/test/defs/test_defs_tr.rb +7 -0
  131. data/test/defs/test_defs_ua.rb +41 -0
  132. data/test/defs/{test_defs_united_nations.rb → test_defs_unitednations.rb} +3 -3
  133. data/test/defs/test_defs_us.rb +11 -11
  134. data/test/holidays/core_extensions/test_date.rb +3 -2
  135. data/test/holidays/definition/context/test_generator.rb +17 -20
  136. data/test/holidays/definition/generator/test_module.rb +268 -0
  137. data/test/holidays/definition/repository/test_holidays_by_month.rb +121 -1
  138. data/test/holidays/finder/rules/test_year_range.rb +43 -47
  139. data/test/integration/test_available_regions.rb +1 -1
  140. data/test/integration/test_custom_year_range_holidays.rb +0 -7
  141. data/test/integration/test_holidays.rb +2 -36
  142. data/test/integration/test_holidays_between.rb +11 -1
  143. data/test/integration/test_multiple_regions_with_conflict.rb +29 -0
  144. data/test/integration/test_nonstandard_regions.rb +25 -0
  145. metadata +61 -32
  146. data/test/defs/test_defs_federal_reserve.rb +0 -113
@@ -196,5 +196,27 @@ 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
+
217
+ assert_equal "Reconciliation Day", (Holidays.on(Date.civil(2024, 5, 27), [:au_act])[0] || {})[:name]
218
+
219
+ assert_equal "Reconciliation Day", (Holidays.on(Date.civil(2025, 6, 2), [:au_act])[0] || {})[:name]
220
+
199
221
  end
200
222
  end
@@ -3,7 +3,7 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
3
3
 
4
4
  # This file is generated by the Ruby Holiday gem.
5
5
  #
6
- # Definitions loaded: definitions/ca.yaml, definitions/north_america_informal.yaml
6
+ # Definitions loaded: definitions/ca.yaml, definitions/northamericainformal.yaml
7
7
  class CaDefinitionTests < Test::Unit::TestCase # :nodoc:
8
8
 
9
9
  def test_ca
@@ -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
 
@@ -73,7 +73,7 @@ class CaDefinitionTests < Test::Unit::TestCase # :nodoc:
73
73
 
74
74
  assert_equal "Family Day", (Holidays.on(Date.civil(2014, 2, 10), [:ca_bc])[0] || {})[:name]
75
75
 
76
- assert_equal "Family Day", (Holidays.on(Date.civil(2044, 2, 8), [:ca_bc])[0] || {})[:name]
76
+ assert_equal "Family Day", (Holidays.on(Date.civil(2018, 2, 12), [:ca_bc])[0] || {})[:name]
77
77
 
78
78
  assert_nil (Holidays.on(Date.civil(2000, 2, 14), [:ca_bc])[0] || {})[:name]
79
79
 
@@ -81,6 +81,22 @@ class CaDefinitionTests < Test::Unit::TestCase # :nodoc:
81
81
 
82
82
  assert_nil (Holidays.on(Date.civil(2012, 2, 13), [:ca_bc])[0] || {})[:name]
83
83
 
84
+ assert_nil (Holidays.on(Date.civil(2019, 2, 11), [:ca_bc])[0] || {})[:name]
85
+
86
+ assert_nil (Holidays.on(Date.civil(2044, 2, 8), [:ca_bc])[0] || {})[:name]
87
+
88
+ assert_equal "Family Day", (Holidays.on(Date.civil(2019, 2, 18), [:ca_bc])[0] || {})[:name]
89
+
90
+ assert_equal "Family Day", (Holidays.on(Date.civil(2020, 2, 17), [:ca_bc])[0] || {})[:name]
91
+
92
+ assert_equal "Family Day", (Holidays.on(Date.civil(2044, 2, 15), [:ca_bc])[0] || {})[:name]
93
+
94
+ assert_nil (Holidays.on(Date.civil(2000, 2, 21), [:ca_bc])[0] || {})[:name]
95
+
96
+ assert_nil (Holidays.on(Date.civil(2011, 2, 21), [:ca_bc])[0] || {})[:name]
97
+
98
+ assert_nil (Holidays.on(Date.civil(2018, 2, 19), [:ca_bc])[0] || {})[:name]
99
+
84
100
  assert_equal "Family Day", (Holidays.on(Date.civil(2018, 2, 19), [:ca_nb])[0] || {})[:name]
85
101
 
86
102
  assert_equal "Family Day", (Holidays.on(Date.civil(2019, 2, 18), [:ca_nb])[0] || {})[:name]
@@ -185,16 +201,45 @@ assert_equal "Remembrance Day", (Holidays.on(Date.civil(2017, 11, 13), [:ca_ab,
185
201
 
186
202
  assert_equal "Canada Day", (Holidays.on(Date.civil(2017, 7, 3), [:ca], [:observed])[0] || {})[:name]
187
203
 
188
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 27), [:ca], [:observed])[0] || {})[:name]
204
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2021, 9, 30), [:ca_bc, :ca_nt, :ca_pe, :ca_yt])[0] || {})[:name]
205
+
206
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2021, 9, 30), [:ca_ab, :ca_mb, :ca_nu], [:informal])[0] || {})[:name]
207
+
208
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2023, 10, 2), [:ca_bc, :ca_nt, :ca_pe, :ca_yt], [:observed])[0] || {})[:name]
209
+
210
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2023, 10, 2), [:ca_ab, :ca_mb, :ca_nu], [:informal, :observed])[0] || {})[:name]
211
+
212
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2026, 9, 30), [:ca_bc, :ca_nt, :ca_pe, :ca_yt], [:observed])[0] || {})[:name]
213
+
214
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2026, 9, 30), [:ca_ab, :ca_mb, :ca_nu], [:informal, :observed])[0] || {})[:name]
215
+
216
+ assert_nil (Holidays.on(Date.civil(2020, 9, 30), [:ca])[0] || {})[:name]
217
+
218
+ assert_nil (Holidays.on(Date.civil(1985, 9, 30), [:ca])[0] || {})[:name]
219
+
220
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 25), [:ca_on])[0] || {})[:name]
189
221
 
190
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2012, 12, 25), [:ca], [:observed])[0] || {})[:name]
222
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2018, 12, 25), [:ca_on])[0] || {})[:name]
191
223
 
192
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2016, 12, 26), [:ca], [:observed])[0] || {})[:name]
224
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 25), [:ca_on])[0] || {})[:name]
193
225
 
194
- assert_equal "Boxing Day", (Holidays.on(Date.civil(2010, 12, 28), [:ca_on], [:observed])[0] || {})[:name]
226
+ assert_nil (Holidays.on(Date.civil(2022, 12, 25), [:ca], [:observed])[0] || {})[:name]
227
+
228
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 24), [:ca_on], [:observed])[0] || {})[:name]
229
+
230
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2012, 12, 25), [:ca_on], [:observed])[0] || {})[:name]
231
+
232
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2016, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
233
+
234
+ 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]
235
+
236
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12, 27), [:ca_on], [:observed])[0] || {})[:name]
237
+
238
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
239
+
240
+ assert_equal "Boxing Day", (Holidays.on(Date.civil(2010, 12, 27), [:ca_on], [:observed])[0] || {})[:name]
195
241
  assert_equal "Boxing Day", (Holidays.on(Date.civil(2012, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
196
242
  assert_equal "Boxing Day", (Holidays.on(Date.civil(2015, 12, 28), [:ca_on], [:observed])[0] || {})[:name]
197
- assert_equal "Boxing Day", (Holidays.on(Date.civil(2016, 12, 27), [:ca_on], [:observed])[0] || {})[:name]
198
243
 
199
244
  assert_nil (Holidays.on(Date.civil(2015, 6, 21), [:ca_yt])[0] || {})[:name]
200
245
 
@@ -204,6 +249,24 @@ assert_equal "Boxing Day", (Holidays.on(Date.civil(2016, 12, 27), [:ca_on], [:ob
204
249
 
205
250
  assert_equal "National Aboriginal Day", (Holidays.on(Date.civil(2018, 6, 21), [:ca_yt])[0] || {})[:name]
206
251
 
252
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2019, 8, 5), [:ca_mb], [:informal])[0] || {})[:name]
253
+
254
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2020, 8, 3), [:ca_mb], [:informal])[0] || {})[:name]
255
+
256
+ assert_nil (Holidays.on(Date.civil(2020, 8, 3), [:ca_mb])[0] || {})[:name]
257
+
258
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2015, 8, 3), [:ca_mb], [:informal])[0] || {})[:name]
259
+
260
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2045, 8, 7), [:ca_mb], [:informal])[0] || {})[:name]
261
+
262
+ assert_equal "Nunavut Day", (Holidays.on(Date.civil(2020, 7, 9), [:ca_nu])[0] || {})[:name]
263
+
264
+ assert_equal "Nunavut Day", (Holidays.on(Date.civil(2021, 7, 9), [:ca_nu])[0] || {})[:name]
265
+
266
+ assert_nil (Holidays.on(Date.civil(2019, 7, 9), [:ca_nu])[0] || {})[:name]
267
+
268
+ assert_nil (Holidays.on(Date.civil(2018, 7, 9), [:ca_nu])[0] || {})[:name]
269
+
207
270
  assert_equal "Groundhog Day", (Holidays.on(Date.civil(2013, 2, 2), [:us], [:informal])[0] || {})[:name]
208
271
 
209
272
  assert_equal "Valentine's Day", (Holidays.on(Date.civil(2013, 2, 14), [:us], [:informal])[0] || {})[:name]
@@ -43,5 +43,9 @@ class ChDefinitionTests < Test::Unit::TestCase # :nodoc:
43
43
 
44
44
  assert_equal "Näfelser Fahrt", (Holidays.on(Date.civil(2014, 4, 3), [:ch_gl])[0] || {})[:name]
45
45
 
46
+ assert_equal "Zibelemärit", (Holidays.on(Date.civil(2014, 11, 24), [:ch_be])[0] || {})[:name]
47
+
48
+ assert_equal "Zibelemärit", (Holidays.on(Date.civil(2020, 11, 23), [:ch_be])[0] || {})[:name]
49
+
46
50
  end
47
51
  end
@@ -45,11 +45,11 @@ class CoDefinitionTests < Test::Unit::TestCase # :nodoc:
45
45
 
46
46
  assert_equal "Día de la Ascensión", (Holidays.on(Date.civil(2017, 5, 29), [:co])[0] || {})[:name]
47
47
 
48
- assert_equal "Corpus Christi", (Holidays.on(Date.civil(2014, 6, 19), [:co])[0] || {})[:name]
48
+ assert_equal "Corpus Christi", (Holidays.on(Date.civil(2014, 6, 23), [:co])[0] || {})[:name]
49
49
 
50
- assert_equal "Corpus Christi", (Holidays.on(Date.civil(2016, 5, 26), [:co])[0] || {})[:name]
50
+ assert_equal "Corpus Christi", (Holidays.on(Date.civil(2016, 5, 30), [:co])[0] || {})[:name]
51
51
 
52
- assert_equal "Corpus Christi", (Holidays.on(Date.civil(2017, 6, 15), [:co])[0] || {})[:name]
52
+ assert_equal "Corpus Christi", (Holidays.on(Date.civil(2017, 6, 19), [:co])[0] || {})[:name]
53
53
 
54
54
  assert_equal "Sagrado Corazón", (Holidays.on(Date.civil(2014, 6, 30), [:co])[0] || {})[:name]
55
55
 
@@ -75,5 +75,13 @@ class DeDefinitionTests < Test::Unit::TestCase # :nodoc:
75
75
 
76
76
  assert_equal "Aschermittwoch", (Holidays.on(Date.civil(2016, 2, 10), [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn], [:informal])[0] || {})[:name]
77
77
 
78
+ assert_nil (Holidays.on(Date.civil(2018, 3, 8), [:de_be])[0] || {})[:name]
79
+
80
+ assert_equal "Internationaler Frauentag", (Holidays.on(Date.civil(2019, 3, 8), [:de_be])[0] || {})[:name]
81
+
82
+ assert_equal "Internationaler Frauentag", (Holidays.on(Date.civil(2023, 3, 8), [:de_mv])[0] || {})[:name]
83
+
84
+ assert_equal "Tag der Befreiung", (Holidays.on(Date.civil(2020, 5, 8), [:de_be])[0] || {})[:name]
85
+
78
86
  end
79
87
  end
@@ -7,6 +7,10 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
7
7
  class DkDefinitionTests < Test::Unit::TestCase # :nodoc:
8
8
 
9
9
  def test_dk
10
+ assert_equal "Store Bededag", (Holidays.on(Date.civil(2023, 5, 5), [:dk])[0] || {})[:name]
11
+
12
+ assert_nil (Holidays.on(Date.civil(2024, 4, 26), [:dk])[0] || {})[:name]
13
+
10
14
  assert_equal "Nytårsdag", (Holidays.on(Date.civil(2007, 1, 1), [:dk], [:informal])[0] || {})[:name]
11
15
 
12
16
  assert_equal "Fastelavn", (Holidays.on(Date.civil(2007, 2, 18), [:dk], [:informal])[0] || {})[:name]
@@ -3,25 +3,25 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
3
3
 
4
4
  # This file is generated by the Ruby Holiday gem.
5
5
  #
6
- # Definitions loaded: definitions/ecb_target.yaml
7
- class Ecb_targetDefinitionTests < Test::Unit::TestCase # :nodoc:
6
+ # Definitions loaded: definitions/ecbtarget.yaml
7
+ class EcbtargetDefinitionTests < Test::Unit::TestCase # :nodoc:
8
8
 
9
- def test_ecb_target
10
- assert_equal "New Year's Day", (Holidays.on(Date.civil(2013, 1, 1), [:ecb_target])[0] || {})[:name]
9
+ def test_ecbtarget
10
+ assert_equal "New Year's Day", (Holidays.on(Date.civil(2013, 1, 1), [:ecbtarget])[0] || {})[:name]
11
11
 
12
- assert_equal "Labour Day", (Holidays.on(Date.civil(2013, 5, 1), [:ecb_target])[0] || {})[:name]
12
+ assert_equal "Labour Day", (Holidays.on(Date.civil(2013, 5, 1), [:ecbtarget])[0] || {})[:name]
13
13
 
14
- assert_equal "Good Friday", (Holidays.on(Date.civil(2013, 3, 29), [:ecb_target])[0] || {})[:name]
14
+ assert_equal "Good Friday", (Holidays.on(Date.civil(2013, 3, 29), [:ecbtarget])[0] || {})[:name]
15
15
 
16
- assert_equal "Easter Monday", (Holidays.on(Date.civil(2013, 4, 1), [:ecb_target])[0] || {})[:name]
16
+ assert_equal "Easter Monday", (Holidays.on(Date.civil(2013, 4, 1), [:ecbtarget])[0] || {})[:name]
17
17
 
18
- assert_equal "Christmas Day", (Holidays.on(Date.civil(2013, 12, 25), [:ecb_target])[0] || {})[:name]
18
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2013, 12, 25), [:ecbtarget])[0] || {})[:name]
19
19
 
20
- assert_equal "Christmas Holiday", (Holidays.on(Date.civil(2013, 12, 26), [:ecb_target])[0] || {})[:name]
20
+ assert_equal "Christmas Holiday", (Holidays.on(Date.civil(2013, 12, 26), [:ecbtarget])[0] || {})[:name]
21
21
 
22
- assert_equal "Good Friday", (Holidays.on(Date.civil(2013, 3, 29), [:ecb_target])[0] || {})[:name]
22
+ assert_equal "Good Friday", (Holidays.on(Date.civil(2013, 3, 29), [:ecbtarget])[0] || {})[:name]
23
23
 
24
- assert_equal "Easter Monday", (Holidays.on(Date.civil(2013, 4, 1), [:ecb_target])[0] || {})[:name]
24
+ assert_equal "Easter Monday", (Holidays.on(Date.civil(2013, 4, 1), [:ecbtarget])[0] || {})[:name]
25
25
 
26
26
  end
27
27
  end
@@ -131,5 +131,7 @@ class EsDefinitionTests < Test::Unit::TestCase # :nodoc:
131
131
 
132
132
  assert_equal "Fiesta Nacional de Cataluña", (Holidays.on(Date.civil(2009, 9, 11), [:es_ct])[0] || {})[:name]
133
133
 
134
+ assert_equal "Lunes de Pascua Granada", (Holidays.on(Date.civil(2020, 6, 1), [:es_ct])[0] || {})[:name]
135
+
134
136
  end
135
137
  end
@@ -3,7 +3,7 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
3
3
 
4
4
  # This file is generated by the Ruby Holiday gem.
5
5
  #
6
- # Definitions loaded: definitions/at.yaml, definitions/be_fr.yaml, definitions/be_nl.yaml, definitions/ch.yaml, definitions/cz.yaml, definitions/dk.yaml, definitions/de.yaml, definitions/el.yaml, definitions/es.yaml, definitions/fr.yaml, definitions/gb.yaml, definitions/hr.yaml, definitions/hu.yaml, definitions/ie.yaml, definitions/is.yaml, definitions/it.yaml, definitions/li.yaml, definitions/lt.yaml, definitions/nl.yaml, definitions/no.yaml, definitions/pl.yaml, definitions/pt.yaml, definitions/ro.yaml, definitions/sk.yaml, definitions/si.yaml, definitions/bg.yaml
6
+ # Definitions loaded: definitions/at.yaml, definitions/be_fr.yaml, definitions/be_nl.yaml, definitions/ch.yaml, definitions/cz.yaml, definitions/dk.yaml, definitions/de.yaml, definitions/el.yaml, definitions/es.yaml, definitions/fr.yaml, definitions/gb.yaml, definitions/hr.yaml, definitions/hu.yaml, definitions/ie.yaml, definitions/is.yaml, definitions/it.yaml, definitions/li.yaml, definitions/lt.yaml, definitions/lv.yaml, definitions/nl.yaml, definitions/no.yaml, definitions/pl.yaml, definitions/pt.yaml, definitions/ro.yaml, definitions/sk.yaml, definitions/si.yaml, definitions/bg.yaml, definitions/ua.yaml
7
7
  class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
8
8
 
9
9
  def test_europe
@@ -131,6 +131,10 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
131
131
 
132
132
  assert_equal "Näfelser Fahrt", (Holidays.on(Date.civil(2014, 4, 3), [:ch_gl])[0] || {})[:name]
133
133
 
134
+ assert_equal "Zibelemärit", (Holidays.on(Date.civil(2014, 11, 24), [:ch_be])[0] || {})[:name]
135
+
136
+ assert_equal "Zibelemärit", (Holidays.on(Date.civil(2020, 11, 23), [:ch_be])[0] || {})[:name]
137
+
134
138
  assert_equal "Den obnovy samostatného českého státu", (Holidays.on(Date.civil(2010, 1, 1), [:cz], [:informal])[0] || {})[:name]
135
139
 
136
140
  assert_equal "Velký pátek", (Holidays.on(Date.civil(2016, 3, 25), [:cz], [:informal])[0] || {})[:name]
@@ -157,6 +161,10 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
157
161
 
158
162
  assert_equal "2. svátek vánoční", (Holidays.on(Date.civil(2010, 12, 26), [:cz], [:informal])[0] || {})[:name]
159
163
 
164
+ assert_equal "Store Bededag", (Holidays.on(Date.civil(2023, 5, 5), [:dk])[0] || {})[:name]
165
+
166
+ assert_nil (Holidays.on(Date.civil(2024, 4, 26), [:dk])[0] || {})[:name]
167
+
160
168
  assert_equal "Nytårsdag", (Holidays.on(Date.civil(2007, 1, 1), [:dk], [:informal])[0] || {})[:name]
161
169
 
162
170
  assert_equal "Fastelavn", (Holidays.on(Date.civil(2007, 2, 18), [:dk], [:informal])[0] || {})[:name]
@@ -257,6 +265,14 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
257
265
 
258
266
  assert_equal "Aschermittwoch", (Holidays.on(Date.civil(2016, 2, 10), [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn], [:informal])[0] || {})[:name]
259
267
 
268
+ assert_nil (Holidays.on(Date.civil(2018, 3, 8), [:de_be])[0] || {})[:name]
269
+
270
+ assert_equal "Internationaler Frauentag", (Holidays.on(Date.civil(2019, 3, 8), [:de_be])[0] || {})[:name]
271
+
272
+ assert_equal "Internationaler Frauentag", (Holidays.on(Date.civil(2023, 3, 8), [:de_mv])[0] || {})[:name]
273
+
274
+ assert_equal "Tag der Befreiung", (Holidays.on(Date.civil(2020, 5, 8), [:de_be])[0] || {})[:name]
275
+
260
276
  assert_equal "Πρωτοχρονιά", (Holidays.on(Date.civil(2011, 1, 1), [:el], [:informal])[0] || {})[:name]
261
277
 
262
278
  assert_equal "Θεοφάνεια", (Holidays.on(Date.civil(2011, 1, 6), [:el], [:informal])[0] || {})[:name]
@@ -411,6 +427,8 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
411
427
 
412
428
  assert_equal "Fiesta Nacional de Cataluña", (Holidays.on(Date.civil(2009, 9, 11), [:es_ct])[0] || {})[:name]
413
429
 
430
+ assert_equal "Lunes de Pascua Granada", (Holidays.on(Date.civil(2020, 6, 1), [:es_ct])[0] || {})[:name]
431
+
414
432
  assert_equal "Jour de l'an", (Holidays.on(Date.civil(2007, 1, 1), [:fr])[0] || {})[:name]
415
433
 
416
434
  assert_equal "Lundi de Pâques", (Holidays.on(Date.civil(2007, 4, 9), [:fr])[0] || {})[:name]
@@ -421,7 +439,7 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
421
439
 
422
440
  assert_equal "Ascension", (Holidays.on(Date.civil(2007, 5, 17), [:fr])[0] || {})[:name]
423
441
 
424
- assert_equal "Lundi de Pentecôte", (Holidays.on(Date.civil(2007, 5, 28), [:fr])[0] || {})[:name]
442
+ assert_equal "Pentecôte", (Holidays.on(Date.civil(2007, 5, 27), [:fr])[0] || {})[:name]
425
443
 
426
444
  assert_equal "Fête nationale", (Holidays.on(Date.civil(2007, 7, 14), [:fr])[0] || {})[:name]
427
445
 
@@ -435,14 +453,18 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
435
453
 
436
454
  assert_nil (Holidays.on(Date.civil(2007, 4, 8), [:fr])[0] || {})[:name]
437
455
 
438
- assert_nil (Holidays.on(Date.civil(2007, 5, 27), [:fr])[0] || {})[:name]
456
+ assert_nil (Holidays.on(Date.civil(2007, 5, 28), [:fr])[0] || {})[:name]
439
457
 
440
458
  assert_equal "Pâques", (Holidays.on(Date.civil(2007, 4, 8), [:fr], [:informal])[0] || {})[:name]
441
459
 
442
- assert_equal "Pentecôte", (Holidays.on(Date.civil(2007, 5, 27), [:fr], [:informal])[0] || {})[:name]
460
+ assert_equal "Lundi de Pentecôte", (Holidays.on(Date.civil(2007, 5, 28), [:fr], [:informal])[0] || {})[:name]
443
461
 
444
462
  assert_equal "Saint-Étienne", (Holidays.on(Date.civil(2017, 12, 26), [:fr_a, :fr_m], [:informal])[0] || {})[:name]
445
463
 
464
+ assert_equal "Mothering Sunday", (Holidays.on(Date.civil(2022, 3, 27), [:gb], [:informal])[0] || {})[:name]
465
+
466
+ assert_equal "Mothering Sunday", (Holidays.on(Date.civil(2021, 3, 14), [:gb], [:informal])[0] || {})[:name]
467
+
446
468
  assert_equal "Good Friday", (Holidays.on(Date.civil(2008, 3, 21), [:gb], [:informal])[0] || {})[:name]
447
469
 
448
470
  assert_equal "Easter Sunday", (Holidays.on(Date.civil(2008, 3, 23), [:gb], [:informal])[0] || {})[:name]
@@ -467,6 +489,22 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
467
489
 
468
490
  assert_equal "St. Patrick's Day", (Holidays.on(Date.civil(2019, 3, 18), [:gb_nir], [:observed, :informal])[0] || {})[:name]
469
491
 
492
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2020, 7, 12), [:gb_nir])[0] || {})[:name]
493
+
494
+ assert_nil (Holidays.on(Date.civil(2020, 7, 12), [:gb_nir], [:observed])[0] || {})[:name]
495
+
496
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2020, 7, 13), [:gb_nir], [:observed])[0] || {})[:name]
497
+
498
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2008, 7, 12), [:gb_nir])[0] || {})[:name]
499
+
500
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2008, 7, 14), [:gb_nir], [:observed])[0] || {})[:name]
501
+
502
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2021, 7, 12), [:gb_nir])[0] || {})[:name]
503
+
504
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2021, 7, 12), [:gb_nir], [:observed])[0] || {})[:name]
505
+
506
+ assert_nil (Holidays.on(Date.civil(2021, 7, 13), [:gb_nir], [:observed])[0] || {})[:name]
507
+
470
508
  assert_equal "St. Andrew's Day", (Holidays.on(Date.civil(2006, 11, 30), [:gb_sct], [:informal])[0] || {})[:name]
471
509
 
472
510
  assert_equal "St. Andrew's Day", (Holidays.on(Date.civil(2006, 11, 30), [:gb_sct], [:informal, :observed])[0] || {})[:name]
@@ -549,23 +587,45 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
549
587
 
550
588
  assert_equal "Bank Holiday", (Holidays.on(Date.civil(2018, 8, 27), [:je])[0] || {})[:name]
551
589
 
590
+ assert_equal "Bank Holiday", (Holidays.on(Date.civil(2022, 6, 2), [:gb])[0] || {})[:name]
591
+
592
+ assert_nil (Holidays.on(Date.civil(2022, 5, 30), [:gb])[0] || {})[:name]
593
+
594
+ assert_equal "Platinum Jubilee", (Holidays.on(Date.civil(2022, 6, 3), [:gb])[0] || {})[:name]
595
+
596
+ assert_equal "Bank Holiday for the State Funeral of Queen Elizabeth II", (Holidays.on(Date.civil(2022, 9, 19), [:gb])[0] || {})[:name]
597
+
598
+ assert_nil (Holidays.on(Date.civil(2023, 9, 19), [:gb])[0] || {})[:name]
599
+
600
+ assert_nil (Holidays.on(Date.civil(2021, 9, 19), [:gb])[0] || {})[:name]
601
+
602
+ assert_equal "Bank Holiday for the Coronation of King Charles III", (Holidays.on(Date.civil(2023, 5, 8), [:gb])[0] || {})[:name]
603
+
604
+ assert_nil (Holidays.on(Date.civil(2024, 5, 8), [:gb])[0] || {})[:name]
605
+
606
+ assert_nil (Holidays.on(Date.civil(2022, 5, 8), [:gb])[0] || {})[:name]
607
+
608
+ assert_equal "Bank Holiday", (Holidays.on(Date.civil(2023, 5, 29), [:gb])[0] || {})[:name]
609
+
610
+ assert_equal "Bank Holiday for the Coronation of King Charles III", (Holidays.on(Date.civil(2023, 5, 8), [:gb])[0] || {})[:name]
611
+
552
612
  assert_equal "Nova godina", (Holidays.on(Date.civil(2012, 1, 1), [:hr], [:informal])[0] || {})[:name]
553
613
 
554
- assert_equal "Sveta tri kralja", (Holidays.on(Date.civil(2012, 1, 6), [:hr], [:informal])[0] || {})[:name]
614
+ assert_equal "Bogojavljenje ili Sveta tri kralja", (Holidays.on(Date.civil(2012, 1, 6), [:hr], [:informal])[0] || {})[:name]
555
615
 
556
- assert_equal "Međunarodni praznik rada", (Holidays.on(Date.civil(2012, 5, 1), [:hr], [:informal])[0] || {})[:name]
616
+ assert_equal "Praznik rada", (Holidays.on(Date.civil(2012, 5, 1), [:hr], [:informal])[0] || {})[:name]
557
617
 
558
618
  assert_equal "Dan antifašističke borbe", (Holidays.on(Date.civil(2012, 6, 22), [:hr], [:informal])[0] || {})[:name]
559
619
 
560
- assert_equal "Dan državnosti", (Holidays.on(Date.civil(2012, 6, 25), [:hr], [:informal])[0] || {})[:name]
620
+ assert_equal "Dan državnosti", (Holidays.on(Date.civil(2020, 5, 30), [:hr], [:informal])[0] || {})[:name]
561
621
 
562
- assert_equal "Dan pobjede i domovinske zahvalnosti i dan hrvatskih branitelja", (Holidays.on(Date.civil(2012, 8, 5), [:hr], [:informal])[0] || {})[:name]
622
+ assert_equal "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja", (Holidays.on(Date.civil(2012, 8, 5), [:hr], [:informal])[0] || {})[:name]
563
623
 
564
624
  assert_equal "Velika Gospa", (Holidays.on(Date.civil(2012, 8, 15), [:hr], [:informal])[0] || {})[:name]
565
625
 
566
- assert_equal "Dan neovisnosti", (Holidays.on(Date.civil(2012, 10, 8), [:hr], [:informal])[0] || {})[:name]
626
+ assert_equal "Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje", (Holidays.on(Date.civil(2020, 11, 18), [:hr], [:informal])[0] || {})[:name]
567
627
 
568
- assert_equal "Dan svih svetih", (Holidays.on(Date.civil(2012, 11, 1), [:hr], [:informal])[0] || {})[:name]
628
+ assert_equal "Svi sveti", (Holidays.on(Date.civil(2012, 11, 1), [:hr], [:informal])[0] || {})[:name]
569
629
 
570
630
  assert_equal "Božić", (Holidays.on(Date.civil(2012, 12, 25), [:hr], [:informal])[0] || {})[:name]
571
631
 
@@ -589,15 +649,15 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
589
649
 
590
650
  assert_equal "1848/49-es forradalom és szabadságharc ünnepe", (Holidays.on(Date.civil(2012, 3, 15), [:hu], [:informal])[0] || {})[:name]
591
651
 
592
- assert_equal "Húsvét hétfő", (Holidays.on(Date.civil(2011, 4, 25), [:hu], [:informal])[0] || {})[:name]
652
+ assert_equal "Húsvéthétfő", (Holidays.on(Date.civil(2011, 4, 25), [:hu], [:informal])[0] || {})[:name]
593
653
 
594
- assert_equal "Húsvét hétfő", (Holidays.on(Date.civil(2012, 4, 9), [:hu], [:informal])[0] || {})[:name]
654
+ assert_equal "Húsvéthétfő", (Holidays.on(Date.civil(2012, 4, 9), [:hu], [:informal])[0] || {})[:name]
595
655
 
596
656
  assert_equal "A munka ünnepe", (Holidays.on(Date.civil(2012, 5, 1), [:hu], [:informal])[0] || {})[:name]
597
657
 
598
- assert_equal "Pünkösd hétfő", (Holidays.on(Date.civil(2011, 6, 13), [:hu], [:informal])[0] || {})[:name]
658
+ assert_equal "Pünkösdhétfő", (Holidays.on(Date.civil(2011, 6, 13), [:hu], [:informal])[0] || {})[:name]
599
659
 
600
- assert_equal "Pünkösd hétfő", (Holidays.on(Date.civil(2012, 5, 28), [:hu], [:informal])[0] || {})[:name]
660
+ assert_equal "Pünkösdhétfő", (Holidays.on(Date.civil(2012, 5, 28), [:hu], [:informal])[0] || {})[:name]
601
661
 
602
662
  assert_equal "Az államalapítás ünnepe", (Holidays.on(Date.civil(2012, 8, 20), [:hu], [:informal])[0] || {})[:name]
603
663
 
@@ -611,6 +671,14 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
611
671
 
612
672
  assert_nil (Holidays.on(Date.civil(2012, 3, 14), [:hu])[0] || {})[:name]
613
673
 
674
+ assert_equal "Húsvéthétfő", (Holidays.on(Date.civil(2016, 3, 28), [:hu])[0] || {})[:name]
675
+
676
+ assert_nil (Holidays.on(Date.civil(2016, 3, 25), [:hu])[0] || {})[:name]
677
+
678
+ assert_equal "Húsvéthétfő", (Holidays.on(Date.civil(2017, 4, 17), [:hu])[0] || {})[:name]
679
+
680
+ assert_equal "Nagypéntek", (Holidays.on(Date.civil(2017, 4, 14), [:hu])[0] || {})[:name]
681
+
614
682
  assert_equal "New Year's Day", (Holidays.on(Date.civil(2008, 1, 1), [:ie])[0] || {})[:name]
615
683
 
616
684
  assert_equal "St. Patrick's Day", (Holidays.on(Date.civil(2008, 3, 17), [:ie])[0] || {})[:name]
@@ -703,14 +771,34 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
703
771
 
704
772
  assert_equal "Festa della Liberazione", (Holidays.on(Date.civil(2007, 4, 25), [:it], [:informal])[0] || {})[:name]
705
773
 
774
+ assert_equal "Festa di San Liberale", (Holidays.on(Date.civil(2019, 4, 27), [:it_tv], [:informal])[0] || {})[:name]
775
+
706
776
  assert_equal "Festa dei Lavoratori", (Holidays.on(Date.civil(2007, 5, 1), [:it], [:informal])[0] || {})[:name]
707
777
 
778
+ assert_equal "Festa di San Zeno", (Holidays.on(Date.civil(2019, 5, 21), [:it_vr], [:informal])[0] || {})[:name]
779
+
708
780
  assert_equal "Festa della Repubblica", (Holidays.on(Date.civil(2007, 6, 2), [:it], [:informal])[0] || {})[:name]
709
781
 
782
+ assert_equal "Festa di Sant'Antonio di Padova", (Holidays.on(Date.civil(2019, 6, 13), [:it_pd], [:informal])[0] || {})[:name]
783
+
784
+ assert_equal "Festa di San Giovanni Battista", (Holidays.on(Date.civil(2019, 6, 24), [:it_fi, :it_ge, :it_to], [:informal])[0] || {})[:name]
785
+
786
+ assert_nil (Holidays.on(Date.civil(2019, 6, 24), [:it])[0] || {})[:name]
787
+
788
+ assert_equal "Festa di San Pietro e Paolo", (Holidays.on(Date.civil(2019, 6, 29), [:it_rm], [:informal])[0] || {})[:name]
789
+
790
+ assert_nil (Holidays.on(Date.civil(2019, 6, 29), [:it])[0] || {})[:name]
791
+
710
792
  assert_equal "Assunzione", (Holidays.on(Date.civil(2007, 8, 15), [:it], [:informal])[0] || {})[:name]
711
793
 
794
+ assert_equal "Festa della Madonna di Monte Berico", (Holidays.on(Date.civil(2019, 9, 8), [:it_vi], [:informal])[0] || {})[:name]
795
+
712
796
  assert_equal "Ognissanti", (Holidays.on(Date.civil(2007, 11, 1), [:it], [:informal])[0] || {})[:name]
713
797
 
798
+ assert_equal "Festa di San Martino", (Holidays.on(Date.civil(2019, 11, 11), [:it_bl], [:informal])[0] || {})[:name]
799
+
800
+ assert_equal "Festa di San Bellino", (Holidays.on(Date.civil(2019, 11, 26), [:it_ro], [:informal])[0] || {})[:name]
801
+
714
802
  assert_equal "Immacolata Concezione", (Holidays.on(Date.civil(2007, 12, 8), [:it], [:informal])[0] || {})[:name]
715
803
 
716
804
  assert_equal "Natale", (Holidays.on(Date.civil(2007, 12, 25), [:it], [:informal])[0] || {})[:name]
@@ -793,6 +881,93 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
793
881
 
794
882
  assert_equal "Antroji Kalėdų diena", (Holidays.on(Date.civil(2012, 12, 26), [:lt])[0] || {})[:name]
795
883
 
884
+ assert_equal "Jaungada diena", (Holidays.on(Date.civil(2018, 1, 1), [:lv])[0] || {})[:name]
885
+ assert_equal "Jaungada diena", (Holidays.on(Date.civil(2019, 1, 1), [:lv])[0] || {})[:name]
886
+ assert_equal "Jaungada diena", (Holidays.on(Date.civil(2029, 1, 1), [:lv])[0] || {})[:name]
887
+
888
+ assert_equal "Lielā Piektdiena", (Holidays.on(Date.civil(2018, 3, 30), [:lv])[0] || {})[:name]
889
+ assert_equal "Lielā Piektdiena", (Holidays.on(Date.civil(2019, 4, 19), [:lv])[0] || {})[:name]
890
+ assert_equal "Lielā Piektdiena", (Holidays.on(Date.civil(2039, 4, 8), [:lv])[0] || {})[:name]
891
+
892
+ assert_equal "Pirmās Lieldienas", (Holidays.on(Date.civil(2018, 4, 1), [:lv])[0] || {})[:name]
893
+ assert_equal "Pirmās Lieldienas", (Holidays.on(Date.civil(2019, 4, 21), [:lv])[0] || {})[:name]
894
+ assert_equal "Pirmās Lieldienas", (Holidays.on(Date.civil(2039, 4, 10), [:lv])[0] || {})[:name]
895
+
896
+ assert_equal "Otrās Lieldienas", (Holidays.on(Date.civil(2018, 4, 2), [:lv])[0] || {})[:name]
897
+ assert_equal "Otrās Lieldienas", (Holidays.on(Date.civil(2019, 4, 22), [:lv])[0] || {})[:name]
898
+ assert_equal "Otrās Lieldienas", (Holidays.on(Date.civil(2039, 4, 11), [:lv])[0] || {})[:name]
899
+
900
+ assert_equal "Darba svētki, Latvijas Republikas Satversmes sapulces sasaukšanas diena", (Holidays.on(Date.civil(2018, 5, 1), [:lv])[0] || {})[:name]
901
+ assert_equal "Darba svētki, Latvijas Republikas Satversmes sapulces sasaukšanas diena", (Holidays.on(Date.civil(2019, 5, 1), [:lv])[0] || {})[:name]
902
+ assert_equal "Darba svētki, Latvijas Republikas Satversmes sapulces sasaukšanas diena", (Holidays.on(Date.civil(2029, 5, 1), [:lv])[0] || {})[:name]
903
+
904
+ assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.on(Date.civil(2018, 5, 4), [:lv])[0] || {})[:name]
905
+ assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.on(Date.civil(2019, 5, 4), [:lv])[0] || {})[:name]
906
+ assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.on(Date.civil(2020, 5, 4), [:lv])[0] || {})[:name]
907
+
908
+ assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.on(Date.civil(2019, 5, 6), [:lv], [:observed])[0] || {})[:name]
909
+
910
+ assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.on(Date.civil(2020, 5, 4), [:lv], [:observed])[0] || {})[:name]
911
+
912
+ assert_equal "Mātes diena", (Holidays.on(Date.civil(2019, 5, 12), [:lv])[0] || {})[:name]
913
+ assert_equal "Mātes diena", (Holidays.on(Date.civil(2020, 5, 10), [:lv])[0] || {})[:name]
914
+ assert_equal "Mātes diena", (Holidays.on(Date.civil(2029, 5, 13), [:lv])[0] || {})[:name]
915
+
916
+ assert_equal "Diena, kad Latvijas hokeja komanda ieguva bronzas medaļu 2023. gada Pasaules hokeja čempionātā", (Holidays.on(Date.civil(2023, 5, 29), [:lv])[0] || {})[:name]
917
+
918
+ assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2019, 6, 9), [:lv])[0] || {})[:name]
919
+ assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2020, 5, 31), [:lv])[0] || {})[:name]
920
+ assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2029, 5, 20), [:lv])[0] || {})[:name]
921
+
922
+ assert_equal "Līgo diena", (Holidays.on(Date.civil(2019, 6, 23), [:lv])[0] || {})[:name]
923
+ assert_equal "Līgo diena", (Holidays.on(Date.civil(2020, 6, 23), [:lv])[0] || {})[:name]
924
+ assert_equal "Līgo diena", (Holidays.on(Date.civil(2029, 6, 23), [:lv])[0] || {})[:name]
925
+
926
+ assert_equal "Jāņu diena", (Holidays.on(Date.civil(2019, 6, 24), [:lv])[0] || {})[:name]
927
+ assert_equal "Jāņu diena", (Holidays.on(Date.civil(2020, 6, 24), [:lv])[0] || {})[:name]
928
+ assert_equal "Jāņu diena", (Holidays.on(Date.civil(2029, 6, 24), [:lv])[0] || {})[:name]
929
+
930
+ 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]
931
+ 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]
932
+
933
+ 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]
934
+ 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]
935
+
936
+ assert_nil (Holidays.on(Date.civil(2019, 7, 8), [:lv])[0] || {})[:name]
937
+ assert_nil (Holidays.on(Date.civil(2019, 7, 9), [:lv])[0] || {})[:name]
938
+ assert_nil (Holidays.on(Date.civil(2022, 7, 8), [:lv])[0] || {})[:name]
939
+ assert_nil (Holidays.on(Date.civil(2022, 7, 9), [:lv])[0] || {})[:name]
940
+ assert_nil (Holidays.on(Date.civil(2024, 7, 8), [:lv])[0] || {})[:name]
941
+ assert_nil (Holidays.on(Date.civil(2024, 7, 9), [:lv])[0] || {})[:name]
942
+
943
+ 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]
944
+
945
+ assert_nil (Holidays.on(Date.civil(2019, 9, 24), [:lv])[0] || {})[:name]
946
+
947
+ assert_equal "Latvijas Republikas Proklamēšanas diena", (Holidays.on(Date.civil(2019, 11, 18), [:lv])[0] || {})[:name]
948
+ assert_equal "Latvijas Republikas Proklamēšanas diena", (Holidays.on(Date.civil(2020, 11, 18), [:lv])[0] || {})[:name]
949
+ assert_equal "Latvijas Republikas Proklamēšanas diena", (Holidays.on(Date.civil(2029, 11, 18), [:lv])[0] || {})[:name]
950
+
951
+ assert_equal "Latvijas Republikas Proklamēšanas diena", (Holidays.on(Date.civil(2020, 11, 18), [:lv], [:observed])[0] || {})[:name]
952
+
953
+ assert_equal "Latvijas Republikas Proklamēšanas diena", (Holidays.on(Date.civil(2029, 11, 19), [:lv], [:observed])[0] || {})[:name]
954
+
955
+ assert_equal "Ziemassvētku vakars", (Holidays.on(Date.civil(2019, 12, 24), [:lv])[0] || {})[:name]
956
+ assert_equal "Ziemassvētku vakars", (Holidays.on(Date.civil(2020, 12, 24), [:lv])[0] || {})[:name]
957
+ assert_equal "Ziemassvētku vakars", (Holidays.on(Date.civil(2029, 12, 24), [:lv])[0] || {})[:name]
958
+
959
+ assert_equal "Pirmie Ziemassvētki", (Holidays.on(Date.civil(2019, 12, 25), [:lv])[0] || {})[:name]
960
+ assert_equal "Pirmie Ziemassvētki", (Holidays.on(Date.civil(2020, 12, 25), [:lv])[0] || {})[:name]
961
+ assert_equal "Pirmie Ziemassvētki", (Holidays.on(Date.civil(2029, 12, 25), [:lv])[0] || {})[:name]
962
+
963
+ assert_equal "Otrie Ziemassvētki", (Holidays.on(Date.civil(2019, 12, 26), [:lv])[0] || {})[:name]
964
+ assert_equal "Otrie Ziemassvētki", (Holidays.on(Date.civil(2020, 12, 26), [:lv])[0] || {})[:name]
965
+ assert_equal "Otrie Ziemassvētki", (Holidays.on(Date.civil(2029, 12, 26), [:lv])[0] || {})[:name]
966
+
967
+ assert_equal "Vecgada diena", (Holidays.on(Date.civil(2019, 12, 31), [:lv])[0] || {})[:name]
968
+ assert_equal "Vecgada diena", (Holidays.on(Date.civil(2020, 12, 31), [:lv])[0] || {})[:name]
969
+ assert_equal "Vecgada diena", (Holidays.on(Date.civil(2029, 12, 31), [:lv])[0] || {})[:name]
970
+
796
971
  assert_equal "Nieuwjaarsdag", (Holidays.on(Date.civil(2008, 1, 1), [:nl], [:informal])[0] || {})[:name]
797
972
 
798
973
  assert_equal "Goede Vrijdag", (Holidays.on(Date.civil(2008, 3, 21), [:nl], [:informal])[0] || {})[:name]
@@ -1099,6 +1274,12 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
1099
1274
 
1100
1275
  assert_equal "Natal", (Holidays.on(Date.civil(2008, 12, 25), [:pt], [:informal])[0] || {})[:name]
1101
1276
 
1277
+ assert_nil (Holidays.on(Date.civil(2017, 4, 14), [:ro])[0] || {})[:name]
1278
+
1279
+ assert_equal "Paștele - Vinerea Mare", (Holidays.on(Date.civil(2018, 4, 6), [:ro], [:informal])[0] || {})[:name]
1280
+
1281
+ assert_equal "Paștele - Vinerea Mare", (Holidays.on(Date.civil(2019, 4, 26), [:ro], [:informal])[0] || {})[:name]
1282
+
1102
1283
  assert_equal "Paștele - duminică", (Holidays.on(Date.civil(1961, 4, 9), [:ro], [:informal])[0] || {})[:name]
1103
1284
 
1104
1285
  assert_equal "Paștele - luni", (Holidays.on(Date.civil(1961, 4, 10), [:ro], [:informal])[0] || {})[:name]
@@ -1125,8 +1306,16 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
1125
1306
 
1126
1307
  assert_equal "Anul nou", (Holidays.on(Date.civil(2014, 1, 2), [:ro], [:informal])[0] || {})[:name]
1127
1308
 
1309
+ assert_equal "Unirea Principatelor Române", (Holidays.on(Date.civil(2017, 1, 24), [:ro], [:informal])[0] || {})[:name]
1310
+
1311
+ assert_nil (Holidays.on(Date.civil(2016, 1, 24), [:ro])[0] || {})[:name]
1312
+
1128
1313
  assert_equal "Ziua muncii", (Holidays.on(Date.civil(2009, 5, 1), [:ro], [:informal])[0] || {})[:name]
1129
1314
 
1315
+ assert_equal "Ziua Copilului", (Holidays.on(Date.civil(2017, 6, 1), [:ro], [:informal])[0] || {})[:name]
1316
+
1317
+ assert_nil (Holidays.on(Date.civil(2016, 6, 1), [:ro])[0] || {})[:name]
1318
+
1130
1319
  assert_equal "Adormirea Maicii Domnului", (Holidays.on(Date.civil(2012, 8, 15), [:ro], [:informal])[0] || {})[:name]
1131
1320
 
1132
1321
  assert_equal "Sfântul Apostol Andrei", (Holidays.on(Date.civil(2013, 11, 30), [:ro], [:informal])[0] || {})[:name]
@@ -1293,5 +1482,35 @@ assert_equal "božič", (Holidays.on(Date.civil(2020, 12, 25), [:si], [:informal
1293
1482
 
1294
1483
  assert_equal "Christmas", (Holidays.on(Date.civil(2015, 12, 26), [:bg_en])[0] || {})[:name]
1295
1484
 
1485
+ assert_equal "Новий Рік", (Holidays.on(Date.civil(2018, 1, 1), [:ua])[0] || {})[:name]
1486
+
1487
+ assert_equal "Різдво Христове", (Holidays.on(Date.civil(2018, 1, 7), [:ua])[0] || {})[:name]
1488
+
1489
+ assert_equal "Різдво Христове", (Holidays.on(Date.civil(2018, 1, 8), [:ua], [:observed])[0] || {})[:name]
1490
+
1491
+ assert_equal "Міжнародний жіночий день", (Holidays.on(Date.civil(2018, 3, 8), [:ua])[0] || {})[:name]
1492
+
1493
+ assert_equal "Великдень", (Holidays.on(Date.civil(2018, 4, 8), [:ua])[0] || {})[:name]
1494
+
1495
+ assert_equal "Великдень", (Holidays.on(Date.civil(2018, 4, 9), [:ua], [:observed])[0] || {})[:name]
1496
+
1497
+ assert_equal "День праці", (Holidays.on(Date.civil(2018, 5, 1), [:ua])[0] || {})[:name]
1498
+
1499
+ assert_equal "День перемоги над нацизмом у Другій світовій війні", (Holidays.on(Date.civil(2018, 5, 9), [:ua])[0] || {})[:name]
1500
+
1501
+ assert_equal "Трійця", (Holidays.on(Date.civil(2018, 5, 27), [:ua])[0] || {})[:name]
1502
+
1503
+ assert_equal "Трійця", (Holidays.on(Date.civil(2018, 5, 28), [:ua], [:observed])[0] || {})[:name]
1504
+
1505
+ assert_equal "День Конституції", (Holidays.on(Date.civil(2018, 6, 28), [:ua])[0] || {})[:name]
1506
+
1507
+ assert_equal "День Незалежності", (Holidays.on(Date.civil(2018, 8, 24), [:ua])[0] || {})[:name]
1508
+
1509
+ assert_equal "День захисника України", (Holidays.on(Date.civil(2018, 10, 14), [:ua])[0] || {})[:name]
1510
+
1511
+ assert_equal "День захисника України", (Holidays.on(Date.civil(2018, 10, 15), [:ua], [:observed])[0] || {})[:name]
1512
+
1513
+ assert_equal "Різдво Христове", (Holidays.on(Date.civil(2018, 12, 25), [:ua])[0] || {})[:name]
1514
+
1296
1515
  end
1297
1516
  end