holidays 7.0.0 → 8.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/README.md +5 -6
  4. data/doc/CONTRIBUTING.md +2 -1
  5. data/holidays.gemspec +5 -5
  6. data/lib/generated_definitions/MANIFEST +3 -0
  7. data/lib/generated_definitions/REGIONS.rb +2 -2
  8. data/lib/generated_definitions/au.rb +1 -1
  9. data/lib/generated_definitions/ca.rb +14 -12
  10. data/lib/generated_definitions/ch.rb +13 -1
  11. data/lib/generated_definitions/cl.rb +5 -5
  12. data/lib/generated_definitions/de.rb +6 -4
  13. data/lib/generated_definitions/es.rb +4 -2
  14. data/lib/generated_definitions/europe.rb +83 -22
  15. data/lib/generated_definitions/federalreservebanks.rb +1 -1
  16. data/lib/generated_definitions/gb.rb +6 -4
  17. data/lib/generated_definitions/hr.rb +8 -6
  18. data/lib/generated_definitions/hu.rb +3 -2
  19. data/lib/generated_definitions/it.rb +14 -5
  20. data/lib/generated_definitions/jp.rb +24 -20
  21. data/lib/generated_definitions/lu.rb +2 -0
  22. data/lib/generated_definitions/lv.rb +52 -0
  23. data/lib/generated_definitions/mx.rb +3 -3
  24. data/lib/generated_definitions/ng.rb +33 -0
  25. data/lib/generated_definitions/northamerica.rb +21 -20
  26. data/lib/generated_definitions/ro.rb +5 -2
  27. data/lib/generated_definitions/southamerica.rb +5 -5
  28. data/lib/generated_definitions/th.rb +36 -0
  29. data/lib/generated_definitions/tr.rb +5 -3
  30. data/lib/generated_definitions/ua.rb +6 -6
  31. data/lib/generated_definitions/us.rb +5 -6
  32. data/lib/holidays.rb +2 -0
  33. data/lib/holidays/definition/context/generator.rb +20 -34
  34. data/lib/holidays/definition/repository/holidays_by_month.rb +9 -1
  35. data/lib/holidays/finder/context/search.rb +34 -31
  36. data/lib/holidays/finder/rules/year_range.rb +30 -54
  37. data/lib/holidays/version.rb +1 -1
  38. data/test/coverage_report.rb +23 -5
  39. data/test/data/test_custom_year_range_holiday_defs.yaml +6 -10
  40. data/test/data/test_multiple_regions_with_conflicts_region_1.yaml +38 -0
  41. data/test/data/test_multiple_regions_with_conflicts_region_2.yaml +38 -0
  42. data/test/defs/test_defs_ca.rb +31 -1
  43. data/test/defs/test_defs_ch.rb +4 -0
  44. data/test/defs/test_defs_co.rb +3 -3
  45. data/test/defs/test_defs_de.rb +6 -0
  46. data/test/defs/test_defs_es.rb +2 -0
  47. data/test/defs/test_defs_europe.rb +160 -11
  48. data/test/defs/test_defs_federalreservebanks.rb +137 -3
  49. data/test/defs/test_defs_gb.rb +16 -0
  50. data/test/defs/test_defs_hr.rb +6 -6
  51. data/test/defs/test_defs_hu.rb +12 -4
  52. data/test/defs/test_defs_it.rb +20 -0
  53. data/test/defs/test_defs_lu.rb +6 -0
  54. data/test/defs/test_defs_lv.rb +90 -0
  55. data/test/defs/test_defs_ng.rb +29 -0
  56. data/test/defs/test_defs_northamerica.rb +37 -11
  57. data/test/defs/test_defs_ro.rb +14 -0
  58. data/test/defs/test_defs_southamerica.rb +3 -3
  59. data/test/defs/test_defs_th.rb +33 -0
  60. data/test/defs/test_defs_tr.rb +7 -0
  61. data/test/defs/test_defs_us.rb +6 -10
  62. data/test/holidays/core_extensions/test_date.rb +3 -2
  63. data/test/holidays/definition/context/test_generator.rb +5 -18
  64. data/test/holidays/definition/repository/test_holidays_by_month.rb +121 -1
  65. data/test/holidays/finder/rules/test_year_range.rb +43 -47
  66. data/test/integration/test_available_regions.rb +1 -1
  67. data/test/integration/test_custom_year_range_holidays.rb +0 -7
  68. data/test/integration/test_holidays.rb +1 -23
  69. data/test/integration/test_holidays_between.rb +10 -0
  70. data/test/integration/test_multiple_regions_with_conflict.rb +29 -0
  71. data/test/integration/test_nonstandard_regions.rb +1 -1
  72. metadata +27 -13
@@ -4,28 +4,24 @@ months:
4
4
  regions: [custom_year_range_file]
5
5
  mday: 1
6
6
  year_ranges:
7
- - after: 2016
7
+ from: 2016
8
8
  - name: before_year
9
9
  regions: [custom_year_range_file]
10
10
  mday: 2
11
11
  year_ranges:
12
- - before: 2017
12
+ until: 2017
13
13
  - name: between_year
14
14
  regions: [custom_year_range_file]
15
15
  mday: 3
16
16
  year_ranges:
17
- - between: 2016..2018
17
+ between:
18
+ start: 2016
19
+ end: 2018
18
20
  - name: limited_year
19
21
  regions: [custom_year_range_file]
20
22
  mday: 4
21
23
  year_ranges:
22
- - limited: [2016,2018,2019]
23
- - name: multiple_conditions
24
- regions: [custom_year_range_file]
25
- mday: 5
26
- year_ranges:
27
- - before: 2015
28
- - after: 2017
24
+ limited: [2016,2018,2019]
29
25
 
30
26
  tests:
31
27
  - given:
@@ -0,0 +1,38 @@
1
+ months:
2
+ 0:
3
+ - name: With Function Modifier
4
+ regions: [multiple_with_conflict_1]
5
+ function: easter(year)
6
+ function_modifier: 60
7
+ - name: With Function Only Different Function Name
8
+ regions: [multiple_with_conflict_1]
9
+ function: conflict_custom_method_1(year)
10
+ - name: With Function Only Same Function Name
11
+ regions: [multiple_with_conflict_1]
12
+ function: conflict_custom_method_identical_name_between_regions(year)
13
+ - name: With Function Only Same Function Name - Region 1
14
+ regions: [multiple_with_conflict_1]
15
+ function: conflict_custom_method_identical_name_between_regions_but_different_holiday_names(year)
16
+ 1:
17
+ - name: New Year's Day
18
+ regions: [multiple_with_conflict_1]
19
+ mday: 1
20
+ observed: to_monday_if_weekend(date)
21
+ 10:
22
+ - name: Testing Conflict Month 10
23
+ regions: [multiple_with_conflict_1]
24
+ mday: 5
25
+
26
+ methods:
27
+ conflict_custom_method_1:
28
+ arguments: year
29
+ ruby: |
30
+ Date.civil(year, 8, 1)
31
+ conflict_custom_method_identical_name_between_regions:
32
+ arguments: year
33
+ ruby: |
34
+ Date.civil(year, 9, 1)
35
+ conflict_custom_method_identical_name_between_regions_but_different_holiday_names:
36
+ arguments: year
37
+ ruby: |
38
+ Date.civil(year, 9, 15)
@@ -0,0 +1,38 @@
1
+ months:
2
+ 0:
3
+ - name: With Function Modifier
4
+ regions: [multiple_with_conflict_2]
5
+ function: easter(year)
6
+ function_modifier: 64
7
+ - name: With Function Only Different Function Name
8
+ regions: [multiple_with_conflict_2]
9
+ function: conflict_custom_method_2(year)
10
+ - name: With Function Only Same Function Name
11
+ regions: [multiple_with_conflict_2]
12
+ function: conflict_custom_method_identical_name_between_regions(year)
13
+ - name: With Function Only Same Function Name - Region 2
14
+ regions: [multiple_with_conflict_2]
15
+ function: conflict_custom_method_identical_name_between_regions_but_different_holiday_names(year)
16
+ 1:
17
+ - name: New Year's Day
18
+ regions: [multiple_with_conflict_2]
19
+ mday: 1
20
+ observed: to_tuesday_if_sunday_or_monday_if_saturday(date)
21
+ 10:
22
+ - name: Testing Conflict Month 10
23
+ regions: [multiple_with_conflict_2]
24
+ mday: 7
25
+
26
+ methods:
27
+ conflict_custom_method_2:
28
+ arguments: year
29
+ ruby: |
30
+ Date.civil(year, 12, 1)
31
+ conflict_custom_method_identical_name_between_regions:
32
+ arguments: year
33
+ ruby: |
34
+ Date.civil(year, 11, 1)
35
+ conflict_custom_method_identical_name_between_regions_but_different_holiday_names:
36
+ arguments: year
37
+ ruby: |
38
+ Date.civil(year, 11, 15)
@@ -201,12 +201,24 @@ 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, 27), [:ca], [:observed])[0] || {})[:name]
204
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 25), [:ca])[0] || {})[:name]
205
+
206
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2018, 12, 25), [:ca])[0] || {})[:name]
207
+
208
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 25), [:ca])[0] || {})[:name]
209
+
210
+ assert_nil (Holidays.on(Date.civil(2022, 12, 25), [:ca], [:observed])[0] || {})[:name]
211
+
212
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 24), [:ca], [:observed])[0] || {})[:name]
205
213
 
206
214
  assert_equal "Christmas Day", (Holidays.on(Date.civil(2012, 12, 25), [:ca], [:observed])[0] || {})[:name]
207
215
 
208
216
  assert_equal "Christmas Day", (Holidays.on(Date.civil(2016, 12, 26), [:ca], [:observed])[0] || {})[:name]
209
217
 
218
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12, 24), [:ca], [:observed])[0] || {})[:name]
219
+
220
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 26), [:ca], [:observed])[0] || {})[:name]
221
+
210
222
  assert_equal "Boxing Day", (Holidays.on(Date.civil(2010, 12, 28), [:ca_on], [:observed])[0] || {})[:name]
211
223
  assert_equal "Boxing Day", (Holidays.on(Date.civil(2012, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
212
224
  assert_equal "Boxing Day", (Holidays.on(Date.civil(2015, 12, 28), [:ca_on], [:observed])[0] || {})[:name]
@@ -220,6 +232,24 @@ assert_equal "Boxing Day", (Holidays.on(Date.civil(2016, 12, 27), [:ca_on], [:ob
220
232
 
221
233
  assert_equal "National Aboriginal Day", (Holidays.on(Date.civil(2018, 6, 21), [:ca_yt])[0] || {})[:name]
222
234
 
235
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2019, 8, 5), [:ca_mb], [:informal])[0] || {})[:name]
236
+
237
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2020, 8, 3), [:ca_mb], [:informal])[0] || {})[:name]
238
+
239
+ assert_nil (Holidays.on(Date.civil(2020, 8, 3), [:ca_mb])[0] || {})[:name]
240
+
241
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2015, 8, 3), [:ca_mb], [:informal])[0] || {})[:name]
242
+
243
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2045, 8, 7), [:ca_mb], [:informal])[0] || {})[:name]
244
+
245
+ assert_equal "Nunavut Day", (Holidays.on(Date.civil(2020, 7, 9), [:ca_nu])[0] || {})[:name]
246
+
247
+ assert_equal "Nunavut Day", (Holidays.on(Date.civil(2021, 7, 9), [:ca_nu])[0] || {})[:name]
248
+
249
+ assert_nil (Holidays.on(Date.civil(2019, 7, 9), [:ca_nu])[0] || {})[:name]
250
+
251
+ assert_nil (Holidays.on(Date.civil(2018, 7, 9), [:ca_nu])[0] || {})[:name]
252
+
223
253
  assert_equal "Groundhog Day", (Holidays.on(Date.civil(2013, 2, 2), [:us], [:informal])[0] || {})[:name]
224
254
 
225
255
  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,11 @@ 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 "Tag der Befreiung", (Holidays.on(Date.civil(2020, 5, 8), [:de_be])[0] || {})[:name]
83
+
78
84
  end
79
85
  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, definitions/ua.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]
@@ -257,6 +261,12 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
257
261
 
258
262
  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
263
 
264
+ assert_nil (Holidays.on(Date.civil(2018, 3, 8), [:de_be])[0] || {})[:name]
265
+
266
+ assert_equal "Internationaler Frauentag", (Holidays.on(Date.civil(2019, 3, 8), [:de_be])[0] || {})[:name]
267
+
268
+ assert_equal "Tag der Befreiung", (Holidays.on(Date.civil(2020, 5, 8), [:de_be])[0] || {})[:name]
269
+
260
270
  assert_equal "Πρωτοχρονιά", (Holidays.on(Date.civil(2011, 1, 1), [:el], [:informal])[0] || {})[:name]
261
271
 
262
272
  assert_equal "Θεοφάνεια", (Holidays.on(Date.civil(2011, 1, 6), [:el], [:informal])[0] || {})[:name]
@@ -411,6 +421,8 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
411
421
 
412
422
  assert_equal "Fiesta Nacional de Cataluña", (Holidays.on(Date.civil(2009, 9, 11), [:es_ct])[0] || {})[:name]
413
423
 
424
+ assert_equal "Lunes de Pascua Granada", (Holidays.on(Date.civil(2020, 6, 1), [:es_ct])[0] || {})[:name]
425
+
414
426
  assert_equal "Jour de l'an", (Holidays.on(Date.civil(2007, 1, 1), [:fr])[0] || {})[:name]
415
427
 
416
428
  assert_equal "Lundi de Pâques", (Holidays.on(Date.civil(2007, 4, 9), [:fr])[0] || {})[:name]
@@ -467,6 +479,22 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
467
479
 
468
480
  assert_equal "St. Patrick's Day", (Holidays.on(Date.civil(2019, 3, 18), [:gb_nir], [:observed, :informal])[0] || {})[:name]
469
481
 
482
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2020, 7, 12), [:gb_nir])[0] || {})[:name]
483
+
484
+ assert_nil (Holidays.on(Date.civil(2020, 7, 12), [:gb_nir], [:observed])[0] || {})[:name]
485
+
486
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2020, 7, 13), [:gb_nir], [:observed])[0] || {})[:name]
487
+
488
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2008, 7, 12), [:gb_nir])[0] || {})[:name]
489
+
490
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2008, 7, 14), [:gb_nir], [:observed])[0] || {})[:name]
491
+
492
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2021, 7, 12), [:gb_nir])[0] || {})[:name]
493
+
494
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2021, 7, 12), [:gb_nir], [:observed])[0] || {})[:name]
495
+
496
+ assert_nil (Holidays.on(Date.civil(2021, 7, 13), [:gb_nir], [:observed])[0] || {})[:name]
497
+
470
498
  assert_equal "St. Andrew's Day", (Holidays.on(Date.civil(2006, 11, 30), [:gb_sct], [:informal])[0] || {})[:name]
471
499
 
472
500
  assert_equal "St. Andrew's Day", (Holidays.on(Date.civil(2006, 11, 30), [:gb_sct], [:informal, :observed])[0] || {})[:name]
@@ -551,21 +579,21 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
551
579
 
552
580
  assert_equal "Nova godina", (Holidays.on(Date.civil(2012, 1, 1), [:hr], [:informal])[0] || {})[:name]
553
581
 
554
- assert_equal "Sveta tri kralja", (Holidays.on(Date.civil(2012, 1, 6), [:hr], [:informal])[0] || {})[:name]
582
+ assert_equal "Bogojavljenje ili Sveta tri kralja", (Holidays.on(Date.civil(2012, 1, 6), [:hr], [:informal])[0] || {})[:name]
555
583
 
556
- assert_equal "Međunarodni praznik rada", (Holidays.on(Date.civil(2012, 5, 1), [:hr], [:informal])[0] || {})[:name]
584
+ assert_equal "Praznik rada", (Holidays.on(Date.civil(2012, 5, 1), [:hr], [:informal])[0] || {})[:name]
557
585
 
558
586
  assert_equal "Dan antifašističke borbe", (Holidays.on(Date.civil(2012, 6, 22), [:hr], [:informal])[0] || {})[:name]
559
587
 
560
- assert_equal "Dan državnosti", (Holidays.on(Date.civil(2012, 6, 25), [:hr], [:informal])[0] || {})[:name]
588
+ assert_equal "Dan državnosti", (Holidays.on(Date.civil(2020, 5, 30), [:hr], [:informal])[0] || {})[:name]
561
589
 
562
- assert_equal "Dan pobjede i domovinske zahvalnosti i dan hrvatskih branitelja", (Holidays.on(Date.civil(2012, 8, 5), [:hr], [:informal])[0] || {})[:name]
590
+ assert_equal "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja", (Holidays.on(Date.civil(2012, 8, 5), [:hr], [:informal])[0] || {})[:name]
563
591
 
564
592
  assert_equal "Velika Gospa", (Holidays.on(Date.civil(2012, 8, 15), [:hr], [:informal])[0] || {})[:name]
565
593
 
566
- assert_equal "Dan neovisnosti", (Holidays.on(Date.civil(2012, 10, 8), [:hr], [:informal])[0] || {})[:name]
594
+ 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
595
 
568
- assert_equal "Dan svih svetih", (Holidays.on(Date.civil(2012, 11, 1), [:hr], [:informal])[0] || {})[:name]
596
+ assert_equal "Svi sveti", (Holidays.on(Date.civil(2012, 11, 1), [:hr], [:informal])[0] || {})[:name]
569
597
 
570
598
  assert_equal "Božić", (Holidays.on(Date.civil(2012, 12, 25), [:hr], [:informal])[0] || {})[:name]
571
599
 
@@ -589,15 +617,15 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
589
617
 
590
618
  assert_equal "1848/49-es forradalom és szabadságharc ünnepe", (Holidays.on(Date.civil(2012, 3, 15), [:hu], [:informal])[0] || {})[:name]
591
619
 
592
- assert_equal "Húsvét hétfő", (Holidays.on(Date.civil(2011, 4, 25), [:hu], [:informal])[0] || {})[:name]
620
+ assert_equal "Húsvéthétfő", (Holidays.on(Date.civil(2011, 4, 25), [:hu], [:informal])[0] || {})[:name]
593
621
 
594
- assert_equal "Húsvét hétfő", (Holidays.on(Date.civil(2012, 4, 9), [:hu], [:informal])[0] || {})[:name]
622
+ assert_equal "Húsvéthétfő", (Holidays.on(Date.civil(2012, 4, 9), [:hu], [:informal])[0] || {})[:name]
595
623
 
596
624
  assert_equal "A munka ünnepe", (Holidays.on(Date.civil(2012, 5, 1), [:hu], [:informal])[0] || {})[:name]
597
625
 
598
- assert_equal "Pünkösd hétfő", (Holidays.on(Date.civil(2011, 6, 13), [:hu], [:informal])[0] || {})[:name]
626
+ assert_equal "Pünkösdhétfő", (Holidays.on(Date.civil(2011, 6, 13), [:hu], [:informal])[0] || {})[:name]
599
627
 
600
- assert_equal "Pünkösd hétfő", (Holidays.on(Date.civil(2012, 5, 28), [:hu], [:informal])[0] || {})[:name]
628
+ assert_equal "Pünkösdhétfő", (Holidays.on(Date.civil(2012, 5, 28), [:hu], [:informal])[0] || {})[:name]
601
629
 
602
630
  assert_equal "Az államalapítás ünnepe", (Holidays.on(Date.civil(2012, 8, 20), [:hu], [:informal])[0] || {})[:name]
603
631
 
@@ -611,6 +639,14 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
611
639
 
612
640
  assert_nil (Holidays.on(Date.civil(2012, 3, 14), [:hu])[0] || {})[:name]
613
641
 
642
+ assert_equal "Húsvéthétfő", (Holidays.on(Date.civil(2016, 3, 28), [:hu])[0] || {})[:name]
643
+
644
+ assert_nil (Holidays.on(Date.civil(2016, 3, 25), [:hu])[0] || {})[:name]
645
+
646
+ assert_equal "Húsvéthétfő", (Holidays.on(Date.civil(2017, 4, 17), [:hu])[0] || {})[:name]
647
+
648
+ assert_equal "Nagypéntek", (Holidays.on(Date.civil(2017, 4, 14), [:hu])[0] || {})[:name]
649
+
614
650
  assert_equal "New Year's Day", (Holidays.on(Date.civil(2008, 1, 1), [:ie])[0] || {})[:name]
615
651
 
616
652
  assert_equal "St. Patrick's Day", (Holidays.on(Date.civil(2008, 3, 17), [:ie])[0] || {})[:name]
@@ -703,14 +739,34 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
703
739
 
704
740
  assert_equal "Festa della Liberazione", (Holidays.on(Date.civil(2007, 4, 25), [:it], [:informal])[0] || {})[:name]
705
741
 
742
+ assert_equal "Festa di San Liberale", (Holidays.on(Date.civil(2019, 4, 27), [:it_tv], [:informal])[0] || {})[:name]
743
+
706
744
  assert_equal "Festa dei Lavoratori", (Holidays.on(Date.civil(2007, 5, 1), [:it], [:informal])[0] || {})[:name]
707
745
 
746
+ assert_equal "Festa di San Zeno", (Holidays.on(Date.civil(2019, 5, 21), [:it_vr], [:informal])[0] || {})[:name]
747
+
708
748
  assert_equal "Festa della Repubblica", (Holidays.on(Date.civil(2007, 6, 2), [:it], [:informal])[0] || {})[:name]
709
749
 
750
+ assert_equal "Festa di Sant'Antonio di Padova", (Holidays.on(Date.civil(2019, 6, 13), [:it_pd], [:informal])[0] || {})[:name]
751
+
752
+ assert_equal "Festa di San Giovanni Battista", (Holidays.on(Date.civil(2019, 6, 24), [:it_fi, :it_ge, :it_to], [:informal])[0] || {})[:name]
753
+
754
+ assert_nil (Holidays.on(Date.civil(2019, 6, 24), [:it])[0] || {})[:name]
755
+
756
+ assert_equal "Festa di San Pietro e Paolo", (Holidays.on(Date.civil(2019, 6, 29), [:it_rm], [:informal])[0] || {})[:name]
757
+
758
+ assert_nil (Holidays.on(Date.civil(2019, 6, 29), [:it])[0] || {})[:name]
759
+
710
760
  assert_equal "Assunzione", (Holidays.on(Date.civil(2007, 8, 15), [:it], [:informal])[0] || {})[:name]
711
761
 
762
+ assert_equal "Festa della Madonna di Monte Berico", (Holidays.on(Date.civil(2019, 9, 8), [:it_vi], [:informal])[0] || {})[:name]
763
+
712
764
  assert_equal "Ognissanti", (Holidays.on(Date.civil(2007, 11, 1), [:it], [:informal])[0] || {})[:name]
713
765
 
766
+ assert_equal "Festa di San Martino", (Holidays.on(Date.civil(2019, 11, 11), [:it_bl], [:informal])[0] || {})[:name]
767
+
768
+ assert_equal "Festa di San Bellino", (Holidays.on(Date.civil(2019, 11, 26), [:it_ro], [:informal])[0] || {})[:name]
769
+
714
770
  assert_equal "Immacolata Concezione", (Holidays.on(Date.civil(2007, 12, 8), [:it], [:informal])[0] || {})[:name]
715
771
 
716
772
  assert_equal "Natale", (Holidays.on(Date.civil(2007, 12, 25), [:it], [:informal])[0] || {})[:name]
@@ -793,6 +849,85 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
793
849
 
794
850
  assert_equal "Antroji Kalėdų diena", (Holidays.on(Date.civil(2012, 12, 26), [:lt])[0] || {})[:name]
795
851
 
852
+ assert_equal "Jaungada diena", (Holidays.on(Date.civil(2018, 1, 1), [:lv])[0] || {})[:name]
853
+ assert_equal "Jaungada diena", (Holidays.on(Date.civil(2019, 1, 1), [:lv])[0] || {})[:name]
854
+ assert_equal "Jaungada diena", (Holidays.on(Date.civil(2029, 1, 1), [:lv])[0] || {})[:name]
855
+
856
+ assert_equal "Lielā Piektdiena", (Holidays.on(Date.civil(2018, 3, 30), [:lv])[0] || {})[:name]
857
+ assert_equal "Lielā Piektdiena", (Holidays.on(Date.civil(2019, 4, 19), [:lv])[0] || {})[:name]
858
+ assert_equal "Lielā Piektdiena", (Holidays.on(Date.civil(2039, 4, 8), [:lv])[0] || {})[:name]
859
+
860
+ assert_equal "Pirmās Lieldienas", (Holidays.on(Date.civil(2018, 4, 1), [:lv])[0] || {})[:name]
861
+ assert_equal "Pirmās Lieldienas", (Holidays.on(Date.civil(2019, 4, 21), [:lv])[0] || {})[:name]
862
+ assert_equal "Pirmās Lieldienas", (Holidays.on(Date.civil(2039, 4, 10), [:lv])[0] || {})[:name]
863
+
864
+ assert_equal "Otrās Lieldienas", (Holidays.on(Date.civil(2018, 4, 2), [:lv])[0] || {})[:name]
865
+ assert_equal "Otrās Lieldienas", (Holidays.on(Date.civil(2019, 4, 22), [:lv])[0] || {})[:name]
866
+ assert_equal "Otrās Lieldienas", (Holidays.on(Date.civil(2039, 4, 11), [:lv])[0] || {})[:name]
867
+
868
+ assert_equal "Darba svētki, Latvijas Republikas Satversmes sapulces sasaukšanas diena", (Holidays.on(Date.civil(2018, 5, 1), [:lv])[0] || {})[:name]
869
+ assert_equal "Darba svētki, Latvijas Republikas Satversmes sapulces sasaukšanas diena", (Holidays.on(Date.civil(2019, 5, 1), [:lv])[0] || {})[:name]
870
+ assert_equal "Darba svētki, Latvijas Republikas Satversmes sapulces sasaukšanas diena", (Holidays.on(Date.civil(2029, 5, 1), [:lv])[0] || {})[:name]
871
+
872
+ assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.on(Date.civil(2018, 5, 4), [:lv])[0] || {})[:name]
873
+ assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.on(Date.civil(2019, 5, 4), [:lv])[0] || {})[:name]
874
+ assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.on(Date.civil(2020, 5, 4), [:lv])[0] || {})[:name]
875
+
876
+ assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.on(Date.civil(2019, 5, 6), [:lv], [:observed])[0] || {})[:name]
877
+
878
+ assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.on(Date.civil(2020, 5, 4), [:lv], [:observed])[0] || {})[:name]
879
+
880
+ assert_equal "Mātes diena", (Holidays.on(Date.civil(2019, 5, 12), [:lv])[0] || {})[:name]
881
+ assert_equal "Mātes diena", (Holidays.on(Date.civil(2020, 5, 10), [:lv])[0] || {})[:name]
882
+ assert_equal "Mātes diena", (Holidays.on(Date.civil(2029, 5, 13), [:lv])[0] || {})[:name]
883
+
884
+ assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2019, 6, 9), [:lv])[0] || {})[:name]
885
+ assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2020, 5, 31), [:lv])[0] || {})[:name]
886
+ assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2029, 5, 20), [:lv])[0] || {})[:name]
887
+
888
+ assert_equal "Līgo diena", (Holidays.on(Date.civil(2019, 6, 23), [:lv])[0] || {})[:name]
889
+ assert_equal "Līgo diena", (Holidays.on(Date.civil(2020, 6, 23), [:lv])[0] || {})[:name]
890
+ assert_equal "Līgo diena", (Holidays.on(Date.civil(2029, 6, 23), [:lv])[0] || {})[:name]
891
+
892
+ assert_equal "Jāņu diena", (Holidays.on(Date.civil(2019, 6, 24), [:lv])[0] || {})[:name]
893
+ assert_equal "Jāņu diena", (Holidays.on(Date.civil(2020, 6, 24), [:lv])[0] || {})[:name]
894
+ assert_equal "Jāņu diena", (Holidays.on(Date.civil(2029, 6, 24), [:lv])[0] || {})[:name]
895
+
896
+ 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]
897
+
898
+ 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]
899
+
900
+ assert_nil (Holidays.on(Date.civil(2019, 7, 8), [:lv])[0] || {})[:name]
901
+ assert_nil (Holidays.on(Date.civil(2019, 7, 9), [:lv])[0] || {})[:name]
902
+
903
+ 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
+
905
+ assert_nil (Holidays.on(Date.civil(2019, 9, 24), [:lv])[0] || {})[:name]
906
+
907
+ assert_equal "Latvijas Republikas Proklamēšanas diena", (Holidays.on(Date.civil(2019, 11, 18), [:lv])[0] || {})[:name]
908
+ assert_equal "Latvijas Republikas Proklamēšanas diena", (Holidays.on(Date.civil(2020, 11, 18), [:lv])[0] || {})[:name]
909
+ assert_equal "Latvijas Republikas Proklamēšanas diena", (Holidays.on(Date.civil(2029, 11, 18), [:lv])[0] || {})[:name]
910
+
911
+ assert_equal "Latvijas Republikas Proklamēšanas diena", (Holidays.on(Date.civil(2020, 11, 18), [:lv], [:observed])[0] || {})[:name]
912
+
913
+ assert_equal "Latvijas Republikas Proklamēšanas diena", (Holidays.on(Date.civil(2029, 11, 19), [:lv], [:observed])[0] || {})[:name]
914
+
915
+ assert_equal "Ziemassvētku vakars", (Holidays.on(Date.civil(2019, 12, 24), [:lv])[0] || {})[:name]
916
+ assert_equal "Ziemassvētku vakars", (Holidays.on(Date.civil(2020, 12, 24), [:lv])[0] || {})[:name]
917
+ assert_equal "Ziemassvētku vakars", (Holidays.on(Date.civil(2029, 12, 24), [:lv])[0] || {})[:name]
918
+
919
+ assert_equal "Pirmie Ziemassvētki", (Holidays.on(Date.civil(2019, 12, 25), [:lv])[0] || {})[:name]
920
+ assert_equal "Pirmie Ziemassvētki", (Holidays.on(Date.civil(2020, 12, 25), [:lv])[0] || {})[:name]
921
+ assert_equal "Pirmie Ziemassvētki", (Holidays.on(Date.civil(2029, 12, 25), [:lv])[0] || {})[:name]
922
+
923
+ assert_equal "Otrie Ziemassvētki", (Holidays.on(Date.civil(2019, 12, 26), [:lv])[0] || {})[:name]
924
+ assert_equal "Otrie Ziemassvētki", (Holidays.on(Date.civil(2020, 12, 26), [:lv])[0] || {})[:name]
925
+ assert_equal "Otrie Ziemassvētki", (Holidays.on(Date.civil(2029, 12, 26), [:lv])[0] || {})[:name]
926
+
927
+ assert_equal "Vecgada diena", (Holidays.on(Date.civil(2019, 12, 31), [:lv])[0] || {})[:name]
928
+ assert_equal "Vecgada diena", (Holidays.on(Date.civil(2020, 12, 31), [:lv])[0] || {})[:name]
929
+ assert_equal "Vecgada diena", (Holidays.on(Date.civil(2029, 12, 31), [:lv])[0] || {})[:name]
930
+
796
931
  assert_equal "Nieuwjaarsdag", (Holidays.on(Date.civil(2008, 1, 1), [:nl], [:informal])[0] || {})[:name]
797
932
 
798
933
  assert_equal "Goede Vrijdag", (Holidays.on(Date.civil(2008, 3, 21), [:nl], [:informal])[0] || {})[:name]
@@ -1099,6 +1234,12 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
1099
1234
 
1100
1235
  assert_equal "Natal", (Holidays.on(Date.civil(2008, 12, 25), [:pt], [:informal])[0] || {})[:name]
1101
1236
 
1237
+ assert_nil (Holidays.on(Date.civil(2017, 4, 14), [:ro])[0] || {})[:name]
1238
+
1239
+ assert_equal "Paștele - Vinerea Mare", (Holidays.on(Date.civil(2018, 4, 6), [:ro], [:informal])[0] || {})[:name]
1240
+
1241
+ assert_equal "Paștele - Vinerea Mare", (Holidays.on(Date.civil(2019, 4, 26), [:ro], [:informal])[0] || {})[:name]
1242
+
1102
1243
  assert_equal "Paștele - duminică", (Holidays.on(Date.civil(1961, 4, 9), [:ro], [:informal])[0] || {})[:name]
1103
1244
 
1104
1245
  assert_equal "Paștele - luni", (Holidays.on(Date.civil(1961, 4, 10), [:ro], [:informal])[0] || {})[:name]
@@ -1125,8 +1266,16 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
1125
1266
 
1126
1267
  assert_equal "Anul nou", (Holidays.on(Date.civil(2014, 1, 2), [:ro], [:informal])[0] || {})[:name]
1127
1268
 
1269
+ assert_equal "Unirea Principatelor Române", (Holidays.on(Date.civil(2017, 1, 24), [:ro], [:informal])[0] || {})[:name]
1270
+
1271
+ assert_nil (Holidays.on(Date.civil(2016, 1, 24), [:ro])[0] || {})[:name]
1272
+
1128
1273
  assert_equal "Ziua muncii", (Holidays.on(Date.civil(2009, 5, 1), [:ro], [:informal])[0] || {})[:name]
1129
1274
 
1275
+ assert_equal "Ziua Copilului", (Holidays.on(Date.civil(2017, 6, 1), [:ro], [:informal])[0] || {})[:name]
1276
+
1277
+ assert_nil (Holidays.on(Date.civil(2016, 6, 1), [:ro])[0] || {})[:name]
1278
+
1130
1279
  assert_equal "Adormirea Maicii Domnului", (Holidays.on(Date.civil(2012, 8, 15), [:ro], [:informal])[0] || {})[:name]
1131
1280
 
1132
1281
  assert_equal "Sfântul Apostol Andrei", (Holidays.on(Date.civil(2013, 11, 30), [:ro], [:informal])[0] || {})[:name]