holidays 6.6.1 → 8.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +25 -0
  3. data/CHANGELOG.md +76 -0
  4. data/README.md +74 -60
  5. data/doc/CONTRIBUTING.md +2 -1
  6. data/holidays.gemspec +10 -5
  7. data/lib/generated_definitions/MANIFEST +13 -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 +60 -12
  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 +4 -3
  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 +12 -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 +135 -46
  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/gr.rb +38 -0
  37. data/lib/generated_definitions/hk.rb +2 -2
  38. data/lib/generated_definitions/hr.rb +10 -8
  39. data/lib/generated_definitions/hu.rb +4 -3
  40. data/lib/generated_definitions/ie.rb +2 -2
  41. data/lib/generated_definitions/is.rb +2 -2
  42. data/lib/generated_definitions/it.rb +16 -7
  43. data/lib/generated_definitions/jp.rb +31 -16
  44. data/lib/generated_definitions/ke.rb +34 -0
  45. data/lib/generated_definitions/kr.rb +2 -2
  46. data/lib/generated_definitions/kz.rb +38 -0
  47. data/lib/generated_definitions/li.rb +2 -2
  48. data/lib/generated_definitions/lt.rb +4 -3
  49. data/lib/generated_definitions/lu.rb +4 -2
  50. data/lib/generated_definitions/lv.rb +56 -0
  51. data/lib/generated_definitions/ma.rb +2 -2
  52. data/lib/generated_definitions/mt_en.rb +2 -2
  53. data/lib/generated_definitions/mt_mt.rb +2 -2
  54. data/lib/generated_definitions/mx.rb +7 -7
  55. data/lib/generated_definitions/my.rb +2 -2
  56. data/lib/generated_definitions/nerc.rb +2 -2
  57. data/lib/generated_definitions/ng.rb +33 -0
  58. data/lib/generated_definitions/nl.rb +2 -2
  59. data/lib/generated_definitions/no.rb +2 -2
  60. data/lib/generated_definitions/{north_america.rb → northamerica.rb} +34 -26
  61. data/lib/generated_definitions/nyse.rb +3 -2
  62. data/lib/generated_definitions/nz.rb +43 -4
  63. data/lib/generated_definitions/pe.rb +2 -2
  64. data/lib/generated_definitions/ph.rb +2 -2
  65. data/lib/generated_definitions/pl.rb +2 -2
  66. data/lib/generated_definitions/pt.rb +2 -2
  67. data/lib/generated_definitions/ro.rb +6 -3
  68. data/lib/generated_definitions/rs_cyrl.rb +3 -3
  69. data/lib/generated_definitions/rs_la.rb +3 -3
  70. data/lib/generated_definitions/ru.rb +2 -2
  71. data/lib/generated_definitions/scandinavia.rb +3 -3
  72. data/lib/generated_definitions/se.rb +2 -2
  73. data/lib/generated_definitions/sg.rb +2 -2
  74. data/lib/generated_definitions/si.rb +4 -3
  75. data/lib/generated_definitions/sk.rb +2 -2
  76. data/lib/generated_definitions/{south_america.rb → southamerica.rb} +33 -13
  77. data/lib/generated_definitions/th.rb +36 -0
  78. data/lib/generated_definitions/tn.rb +2 -2
  79. data/lib/generated_definitions/tr.rb +7 -5
  80. data/lib/generated_definitions/ua.rb +37 -0
  81. data/lib/generated_definitions/{united_nations.rb → unitednations.rb} +61 -61
  82. data/lib/generated_definitions/ups.rb +2 -2
  83. data/lib/generated_definitions/us.rb +9 -9
  84. data/lib/generated_definitions/ve.rb +2 -2
  85. data/lib/generated_definitions/vi.rb +2 -2
  86. data/lib/generated_definitions/za.rb +3 -3
  87. data/lib/holidays/definition/context/generator.rb +23 -70
  88. data/lib/holidays/definition/generator/module.rb +54 -0
  89. data/lib/holidays/definition/generator/regions.rb +1 -1
  90. data/lib/holidays/definition/repository/holidays_by_month.rb +9 -1
  91. data/lib/holidays/factory/definition.rb +7 -0
  92. data/lib/holidays/finder/context/search.rb +35 -31
  93. data/lib/holidays/finder/rules/year_range.rb +30 -54
  94. data/lib/holidays/version.rb +1 -1
  95. data/lib/holidays.rb +2 -0
  96. data/test/coverage_report.rb +23 -5
  97. data/test/data/test_custom_year_range_holiday_defs.yaml +6 -10
  98. data/test/data/test_multiple_regions_with_conflicts_region_1.yaml +38 -0
  99. data/test/data/test_multiple_regions_with_conflicts_region_2.yaml +38 -0
  100. data/test/defs/test_defs_ar.rb +20 -4
  101. data/test/defs/test_defs_au.rb +33 -0
  102. data/test/defs/test_defs_br.rb +4 -0
  103. data/test/defs/test_defs_ca.rb +71 -8
  104. data/test/defs/test_defs_ch.rb +4 -0
  105. data/test/defs/test_defs_co.rb +3 -3
  106. data/test/defs/test_defs_de.rb +10 -0
  107. data/test/defs/test_defs_dk.rb +4 -0
  108. data/test/defs/{test_defs_ecb_target.rb → test_defs_ecbtarget.rb} +11 -11
  109. data/test/defs/test_defs_es.rb +2 -0
  110. data/test/defs/test_defs_europe.rb +262 -39
  111. data/test/defs/test_defs_federalreserve.rb +119 -0
  112. data/test/defs/test_defs_federalreservebanks.rb +251 -0
  113. data/test/defs/test_defs_fr.rb +3 -3
  114. data/test/defs/test_defs_gb.rb +42 -0
  115. data/test/defs/{test_defs_el.rb → test_defs_gr.rb} +18 -18
  116. data/test/defs/test_defs_hr.rb +6 -6
  117. data/test/defs/test_defs_hu.rb +12 -4
  118. data/test/defs/test_defs_it.rb +20 -0
  119. data/test/defs/test_defs_jp.rb +22 -2
  120. data/test/defs/test_defs_ke.rb +31 -0
  121. data/test/defs/test_defs_kz.rb +39 -0
  122. data/test/defs/test_defs_lt.rb +2 -0
  123. data/test/defs/test_defs_lu.rb +6 -0
  124. data/test/defs/test_defs_lv.rb +98 -0
  125. data/test/defs/test_defs_mx.rb +3 -1
  126. data/test/defs/test_defs_ng.rb +29 -0
  127. data/test/defs/{test_defs_north_america.rb → test_defs_northamerica.rb} +85 -20
  128. data/test/defs/test_defs_nyse.rb +7 -0
  129. data/test/defs/test_defs_nz.rb +8 -0
  130. data/test/defs/test_defs_ro.rb +14 -0
  131. data/test/defs/test_defs_rs_cyrl.rb +1 -1
  132. data/test/defs/test_defs_rs_la.rb +1 -1
  133. data/test/defs/test_defs_scandinavia.rb +4 -0
  134. data/test/defs/{test_defs_south_america.rb → test_defs_southamerica.rb} +29 -9
  135. data/test/defs/test_defs_th.rb +33 -0
  136. data/test/defs/test_defs_tr.rb +7 -0
  137. data/test/defs/test_defs_ua.rb +41 -0
  138. data/test/defs/{test_defs_united_nations.rb → test_defs_unitednations.rb} +3 -3
  139. data/test/defs/test_defs_us.rb +11 -11
  140. data/test/holidays/core_extensions/test_date.rb +3 -2
  141. data/test/holidays/definition/context/test_generator.rb +17 -20
  142. data/test/holidays/definition/generator/test_module.rb +268 -0
  143. data/test/holidays/definition/repository/test_holidays_by_month.rb +121 -1
  144. data/test/holidays/finder/rules/test_year_range.rb +43 -47
  145. data/test/integration/test_available_regions.rb +1 -1
  146. data/test/integration/test_custom_year_range_holidays.rb +0 -7
  147. data/test/integration/test_holidays.rb +2 -36
  148. data/test/integration/test_holidays_between.rb +11 -1
  149. data/test/integration/test_multiple_regions_with_conflict.rb +29 -0
  150. data/test/integration/test_nonstandard_regions.rb +25 -0
  151. metadata +71 -35
  152. data/test/defs/test_defs_federal_reserve.rb +0 -113
@@ -0,0 +1,251 @@
1
+ # encoding: utf-8
2
+ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
3
+
4
+ # This file is generated by the Ruby Holiday gem.
5
+ #
6
+ # Definitions loaded: definitions/federalreservebanks.yaml
7
+ class FederalreservebanksDefinitionTests < Test::Unit::TestCase # :nodoc:
8
+
9
+ def test_federalreservebanks
10
+ assert_equal "New Year's Day", (Holidays.on(Date.civil(2012, 1, 2), [:federalreservebanks], [:observed])[0] || {})[:name]
11
+
12
+ assert_equal "Birthday of Martin Luther King, Jr", (Holidays.on(Date.civil(2012, 1, 16), [:federalreservebanks], [:observed])[0] || {})[:name]
13
+
14
+ assert_equal "Washington's Birthday", (Holidays.on(Date.civil(2012, 2, 20), [:federalreservebanks], [:observed])[0] || {})[:name]
15
+
16
+ assert_equal "Memorial Day", (Holidays.on(Date.civil(2012, 5, 28), [:federalreservebanks], [:observed])[0] || {})[:name]
17
+
18
+ assert_equal "Independence Day", (Holidays.on(Date.civil(2012, 7, 4), [:federalreservebanks], [:observed])[0] || {})[:name]
19
+
20
+ assert_equal "Labor Day", (Holidays.on(Date.civil(2012, 9, 3), [:federalreservebanks], [:observed])[0] || {})[:name]
21
+
22
+ assert_equal "Columbus Day", (Holidays.on(Date.civil(2012, 10, 8), [:federalreservebanks], [:observed])[0] || {})[:name]
23
+
24
+ assert_equal "Veterans Day", (Holidays.on(Date.civil(2012, 11, 12), [:federalreservebanks], [:observed])[0] || {})[:name]
25
+
26
+ assert_equal "Thanksgiving Day", (Holidays.on(Date.civil(2012, 11, 22), [:federalreservebanks], [:observed])[0] || {})[:name]
27
+
28
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2012, 12, 25), [:federalreservebanks], [:observed])[0] || {})[:name]
29
+
30
+ assert_equal "New Year's Day", (Holidays.on(Date.civil(2013, 1, 1), [:federalreservebanks], [:observed])[0] || {})[:name]
31
+
32
+ assert_equal "Birthday of Martin Luther King, Jr", (Holidays.on(Date.civil(2013, 1, 21), [:federalreservebanks], [:observed])[0] || {})[:name]
33
+
34
+ assert_equal "Washington's Birthday", (Holidays.on(Date.civil(2013, 2, 18), [:federalreservebanks], [:observed])[0] || {})[:name]
35
+
36
+ assert_equal "Memorial Day", (Holidays.on(Date.civil(2013, 5, 27), [:federalreservebanks], [:observed])[0] || {})[:name]
37
+
38
+ assert_equal "Independence Day", (Holidays.on(Date.civil(2013, 7, 4), [:federalreservebanks], [:observed])[0] || {})[:name]
39
+
40
+ assert_equal "Labor Day", (Holidays.on(Date.civil(2013, 9, 2), [:federalreservebanks], [:observed])[0] || {})[:name]
41
+
42
+ assert_equal "Columbus Day", (Holidays.on(Date.civil(2013, 10, 14), [:federalreservebanks], [:observed])[0] || {})[:name]
43
+
44
+ assert_equal "Veterans Day", (Holidays.on(Date.civil(2013, 11, 11), [:federalreservebanks], [:observed])[0] || {})[:name]
45
+
46
+ assert_equal "Thanksgiving Day", (Holidays.on(Date.civil(2013, 11, 28), [:federalreservebanks], [:observed])[0] || {})[:name]
47
+
48
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2013, 12, 25), [:federalreservebanks], [:observed])[0] || {})[:name]
49
+
50
+ assert_equal "New Year's Day", (Holidays.on(Date.civil(2014, 1, 1), [:federalreservebanks], [:observed])[0] || {})[:name]
51
+
52
+ assert_equal "Birthday of Martin Luther King, Jr", (Holidays.on(Date.civil(2014, 1, 20), [:federalreservebanks], [:observed])[0] || {})[:name]
53
+
54
+ assert_equal "Washington's Birthday", (Holidays.on(Date.civil(2014, 2, 17), [:federalreservebanks], [:observed])[0] || {})[:name]
55
+
56
+ assert_equal "Memorial Day", (Holidays.on(Date.civil(2014, 5, 26), [:federalreservebanks], [:observed])[0] || {})[:name]
57
+
58
+ assert_equal "Independence Day", (Holidays.on(Date.civil(2014, 7, 4), [:federalreservebanks], [:observed])[0] || {})[:name]
59
+
60
+ assert_equal "Labor Day", (Holidays.on(Date.civil(2014, 9, 1), [:federalreservebanks], [:observed])[0] || {})[:name]
61
+
62
+ assert_equal "Columbus Day", (Holidays.on(Date.civil(2014, 10, 13), [:federalreservebanks], [:observed])[0] || {})[:name]
63
+
64
+ assert_equal "Veterans Day", (Holidays.on(Date.civil(2014, 11, 11), [:federalreservebanks], [:observed])[0] || {})[:name]
65
+
66
+ assert_equal "Thanksgiving Day", (Holidays.on(Date.civil(2014, 11, 27), [:federalreservebanks], [:observed])[0] || {})[:name]
67
+
68
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2014, 12, 25), [:federalreservebanks], [:observed])[0] || {})[:name]
69
+
70
+ assert_equal "New Year's Day", (Holidays.on(Date.civil(2015, 1, 1), [:federalreservebanks], [:observed])[0] || {})[:name]
71
+
72
+ assert_equal "Birthday of Martin Luther King, Jr", (Holidays.on(Date.civil(2015, 1, 19), [:federalreservebanks], [:observed])[0] || {})[:name]
73
+
74
+ assert_equal "Washington's Birthday", (Holidays.on(Date.civil(2015, 2, 16), [:federalreservebanks], [:observed])[0] || {})[:name]
75
+
76
+ assert_equal "Memorial Day", (Holidays.on(Date.civil(2015, 5, 25), [:federalreservebanks], [:observed])[0] || {})[:name]
77
+
78
+ assert_nil (Holidays.on(Date.civil(2015, 7, 3), [:federalreservebanks], [:observed])[0] || {})[:name]
79
+
80
+ assert_nil (Holidays.on(Date.civil(2015, 7, 6), [:federalreservebanks], [:observed])[0] || {})[:name]
81
+
82
+ assert_equal "Labor Day", (Holidays.on(Date.civil(2015, 9, 7), [:federalreservebanks], [:observed])[0] || {})[:name]
83
+
84
+ assert_equal "Columbus Day", (Holidays.on(Date.civil(2015, 10, 12), [:federalreservebanks], [:observed])[0] || {})[:name]
85
+
86
+ assert_equal "Veterans Day", (Holidays.on(Date.civil(2015, 11, 11), [:federalreservebanks], [:observed])[0] || {})[:name]
87
+
88
+ assert_equal "Thanksgiving Day", (Holidays.on(Date.civil(2015, 11, 26), [:federalreservebanks], [:observed])[0] || {})[:name]
89
+
90
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2015, 12, 25), [:federalreservebanks], [:observed])[0] || {})[:name]
91
+
92
+ assert_equal "New Year's Day", (Holidays.on(Date.civil(2016, 1, 1), [:federalreservebanks], [:observed])[0] || {})[:name]
93
+
94
+ assert_equal "Birthday of Martin Luther King, Jr", (Holidays.on(Date.civil(2016, 1, 18), [:federalreservebanks], [:observed])[0] || {})[:name]
95
+
96
+ assert_equal "Washington's Birthday", (Holidays.on(Date.civil(2016, 2, 15), [:federalreservebanks], [:observed])[0] || {})[:name]
97
+
98
+ assert_equal "Memorial Day", (Holidays.on(Date.civil(2016, 5, 30), [:federalreservebanks], [:observed])[0] || {})[:name]
99
+
100
+ assert_equal "Independence Day", (Holidays.on(Date.civil(2016, 7, 4), [:federalreservebanks], [:observed])[0] || {})[:name]
101
+
102
+ assert_equal "Labor Day", (Holidays.on(Date.civil(2016, 9, 5), [:federalreservebanks], [:observed])[0] || {})[:name]
103
+
104
+ assert_equal "Columbus Day", (Holidays.on(Date.civil(2016, 10, 10), [:federalreservebanks], [:observed])[0] || {})[:name]
105
+
106
+ assert_equal "Veterans Day", (Holidays.on(Date.civil(2016, 11, 11), [:federalreservebanks], [:observed])[0] || {})[:name]
107
+
108
+ assert_equal "Thanksgiving Day", (Holidays.on(Date.civil(2016, 11, 24), [:federalreservebanks], [:observed])[0] || {})[:name]
109
+
110
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2016, 12, 26), [:federalreservebanks], [:observed])[0] || {})[:name]
111
+
112
+ assert_equal "New Year's Day", (Holidays.on(Date.civil(2019, 1, 1), [:federalreservebanks], [:observed])[0] || {})[:name]
113
+
114
+ assert_equal "Birthday of Martin Luther King, Jr", (Holidays.on(Date.civil(2019, 1, 21), [:federalreservebanks], [:observed])[0] || {})[:name]
115
+
116
+ assert_equal "Washington's Birthday", (Holidays.on(Date.civil(2019, 2, 18), [:federalreservebanks], [:observed])[0] || {})[:name]
117
+
118
+ assert_equal "Memorial Day", (Holidays.on(Date.civil(2019, 5, 27), [:federalreservebanks], [:observed])[0] || {})[:name]
119
+
120
+ assert_equal "Independence Day", (Holidays.on(Date.civil(2019, 7, 4), [:federalreservebanks], [:observed])[0] || {})[:name]
121
+
122
+ assert_equal "Labor Day", (Holidays.on(Date.civil(2019, 9, 2), [:federalreservebanks], [:observed])[0] || {})[:name]
123
+
124
+ assert_equal "Columbus Day", (Holidays.on(Date.civil(2019, 10, 14), [:federalreservebanks], [:observed])[0] || {})[:name]
125
+
126
+ assert_equal "Veterans Day", (Holidays.on(Date.civil(2019, 11, 11), [:federalreservebanks], [:observed])[0] || {})[:name]
127
+
128
+ assert_equal "Thanksgiving Day", (Holidays.on(Date.civil(2019, 11, 28), [:federalreservebanks], [:observed])[0] || {})[:name]
129
+
130
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2019, 12, 25), [:federalreservebanks], [:observed])[0] || {})[:name]
131
+
132
+ assert_equal "New Year's Day", (Holidays.on(Date.civil(2020, 1, 1), [:federalreservebanks], [:observed])[0] || {})[:name]
133
+
134
+ assert_equal "Birthday of Martin Luther King, Jr", (Holidays.on(Date.civil(2020, 1, 20), [:federalreservebanks], [:observed])[0] || {})[:name]
135
+
136
+ assert_equal "Washington's Birthday", (Holidays.on(Date.civil(2020, 2, 17), [:federalreservebanks], [:observed])[0] || {})[:name]
137
+
138
+ assert_equal "Memorial Day", (Holidays.on(Date.civil(2020, 5, 25), [:federalreservebanks], [:observed])[0] || {})[:name]
139
+
140
+ assert_nil (Holidays.on(Date.civil(2020, 7, 3), [:federalreservebanks], [:observed])[0] || {})[:name]
141
+
142
+ assert_nil (Holidays.on(Date.civil(2020, 7, 6), [:federalreservebanks], [:observed])[0] || {})[:name]
143
+
144
+ assert_equal "Labor Day", (Holidays.on(Date.civil(2020, 9, 7), [:federalreservebanks], [:observed])[0] || {})[:name]
145
+
146
+ assert_equal "Columbus Day", (Holidays.on(Date.civil(2020, 10, 12), [:federalreservebanks], [:observed])[0] || {})[:name]
147
+
148
+ assert_equal "Veterans Day", (Holidays.on(Date.civil(2020, 11, 11), [:federalreservebanks], [:observed])[0] || {})[:name]
149
+
150
+ assert_equal "Thanksgiving Day", (Holidays.on(Date.civil(2020, 11, 26), [:federalreservebanks], [:observed])[0] || {})[:name]
151
+
152
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2020, 12, 25), [:federalreservebanks], [:observed])[0] || {})[:name]
153
+
154
+ assert_equal "New Year's Day", (Holidays.on(Date.civil(2021, 1, 1), [:federalreservebanks], [:observed])[0] || {})[:name]
155
+
156
+ assert_equal "Birthday of Martin Luther King, Jr", (Holidays.on(Date.civil(2021, 1, 18), [:federalreservebanks], [:observed])[0] || {})[:name]
157
+
158
+ assert_equal "Washington's Birthday", (Holidays.on(Date.civil(2021, 2, 15), [:federalreservebanks], [:observed])[0] || {})[:name]
159
+
160
+ assert_equal "Memorial Day", (Holidays.on(Date.civil(2021, 5, 31), [:federalreservebanks], [:observed])[0] || {})[:name]
161
+
162
+ assert_nil (Holidays.on(Date.civil(2021, 7, 2), [:federalreservebanks], [:observed])[0] || {})[:name]
163
+
164
+ assert_equal "Independence Day", (Holidays.on(Date.civil(2021, 7, 5), [:federalreservebanks], [:observed])[0] || {})[:name]
165
+
166
+ assert_equal "Labor Day", (Holidays.on(Date.civil(2021, 9, 6), [:federalreservebanks], [:observed])[0] || {})[:name]
167
+
168
+ assert_equal "Columbus Day", (Holidays.on(Date.civil(2021, 10, 11), [:federalreservebanks], [:observed])[0] || {})[:name]
169
+
170
+ assert_equal "Veterans Day", (Holidays.on(Date.civil(2021, 11, 11), [:federalreservebanks], [:observed])[0] || {})[:name]
171
+
172
+ assert_equal "Thanksgiving Day", (Holidays.on(Date.civil(2021, 11, 25), [:federalreservebanks], [:observed])[0] || {})[:name]
173
+
174
+ assert_nil (Holidays.on(Date.civil(2021, 12, 24), [:federalreservebanks], [:observed])[0] || {})[:name]
175
+
176
+ assert_nil (Holidays.on(Date.civil(2021, 12, 27), [:federalreservebanks], [:observed])[0] || {})[:name]
177
+
178
+ assert_nil (Holidays.on(Date.civil(2021, 12, 31), [:federalreservebanks], [:observed])[0] || {})[:name]
179
+
180
+ assert_nil (Holidays.on(Date.civil(2022, 1, 3), [:federalreservebanks], [:observed])[0] || {})[:name]
181
+
182
+ assert_equal "Birthday of Martin Luther King, Jr", (Holidays.on(Date.civil(2022, 1, 17), [:federalreservebanks], [:observed])[0] || {})[:name]
183
+
184
+ assert_equal "Washington's Birthday", (Holidays.on(Date.civil(2022, 2, 21), [:federalreservebanks], [:observed])[0] || {})[:name]
185
+
186
+ assert_equal "Memorial Day", (Holidays.on(Date.civil(2022, 5, 30), [:federalreservebanks], [:observed])[0] || {})[:name]
187
+
188
+ assert_equal "Independence Day", (Holidays.on(Date.civil(2022, 7, 4), [:federalreservebanks], [:observed])[0] || {})[:name]
189
+
190
+ assert_equal "Labor Day", (Holidays.on(Date.civil(2022, 9, 5), [:federalreservebanks], [:observed])[0] || {})[:name]
191
+
192
+ assert_equal "Columbus Day", (Holidays.on(Date.civil(2022, 10, 10), [:federalreservebanks], [:observed])[0] || {})[:name]
193
+
194
+ assert_equal "Veterans Day", (Holidays.on(Date.civil(2022, 11, 11), [:federalreservebanks], [:observed])[0] || {})[:name]
195
+
196
+ assert_equal "Thanksgiving Day", (Holidays.on(Date.civil(2022, 11, 24), [:federalreservebanks], [:observed])[0] || {})[:name]
197
+
198
+ assert_nil (Holidays.on(Date.civil(2022, 12, 23), [:federalreservebanks], [:observed])[0] || {})[:name]
199
+
200
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 26), [:federalreservebanks], [:observed])[0] || {})[:name]
201
+
202
+ assert_nil (Holidays.on(Date.civil(2022, 12, 30), [:federalreservebanks], [:observed])[0] || {})[:name]
203
+
204
+ assert_equal "New Year's Day", (Holidays.on(Date.civil(2023, 1, 2), [:federalreservebanks], [:observed])[0] || {})[:name]
205
+
206
+ assert_equal "Birthday of Martin Luther King, Jr", (Holidays.on(Date.civil(2023, 1, 16), [:federalreservebanks], [:observed])[0] || {})[:name]
207
+
208
+ assert_equal "Washington's Birthday", (Holidays.on(Date.civil(2023, 2, 20), [:federalreservebanks], [:observed])[0] || {})[:name]
209
+
210
+ assert_equal "Memorial Day", (Holidays.on(Date.civil(2023, 5, 29), [:federalreservebanks], [:observed])[0] || {})[:name]
211
+
212
+ assert_equal "Independence Day", (Holidays.on(Date.civil(2023, 7, 4), [:federalreservebanks], [:observed])[0] || {})[:name]
213
+
214
+ assert_equal "Labor Day", (Holidays.on(Date.civil(2023, 9, 4), [:federalreservebanks], [:observed])[0] || {})[:name]
215
+
216
+ assert_equal "Columbus Day", (Holidays.on(Date.civil(2023, 10, 9), [:federalreservebanks], [:observed])[0] || {})[:name]
217
+
218
+ assert_nil (Holidays.on(Date.civil(2023, 11, 10), [:federalreservebanks], [:observed])[0] || {})[:name]
219
+
220
+ assert_nil (Holidays.on(Date.civil(2023, 11, 13), [:federalreservebanks], [:observed])[0] || {})[:name]
221
+
222
+ assert_equal "Thanksgiving Day", (Holidays.on(Date.civil(2023, 11, 23), [:federalreservebanks], [:observed])[0] || {})[:name]
223
+
224
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2023, 12, 25), [:federalreservebanks], [:observed])[0] || {})[:name]
225
+
226
+ assert_equal "New Year's Day", (Holidays.on(Date.civil(2024, 1, 1), [:federalreservebanks], [:observed])[0] || {})[:name]
227
+
228
+ assert_equal "Birthday of Martin Luther King, Jr", (Holidays.on(Date.civil(2024, 1, 15), [:federalreservebanks], [:observed])[0] || {})[:name]
229
+
230
+ assert_equal "Washington's Birthday", (Holidays.on(Date.civil(2024, 2, 19), [:federalreservebanks], [:observed])[0] || {})[:name]
231
+
232
+ assert_equal "Memorial Day", (Holidays.on(Date.civil(2024, 5, 27), [:federalreservebanks], [:observed])[0] || {})[:name]
233
+
234
+ assert_equal "Independence Day", (Holidays.on(Date.civil(2024, 7, 4), [:federalreservebanks], [:observed])[0] || {})[:name]
235
+
236
+ assert_equal "Labor Day", (Holidays.on(Date.civil(2024, 9, 2), [:federalreservebanks], [:observed])[0] || {})[:name]
237
+
238
+ assert_equal "Columbus Day", (Holidays.on(Date.civil(2024, 10, 14), [:federalreservebanks], [:observed])[0] || {})[:name]
239
+
240
+ assert_equal "Veterans Day", (Holidays.on(Date.civil(2024, 11, 11), [:federalreservebanks], [:observed])[0] || {})[:name]
241
+
242
+ assert_equal "Thanksgiving Day", (Holidays.on(Date.civil(2024, 11, 28), [:federalreservebanks], [:observed])[0] || {})[:name]
243
+
244
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2024, 12, 25), [:federalreservebanks], [:observed])[0] || {})[:name]
245
+
246
+ assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2022, 6, 20), [:federalreservebanks], [:observed])[0] || {})[:name]
247
+
248
+ assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2023, 6, 19), [:federalreservebanks], [:observed])[0] || {})[:name]
249
+
250
+ end
251
+ end
@@ -17,7 +17,7 @@ class FrDefinitionTests < Test::Unit::TestCase # :nodoc:
17
17
 
18
18
  assert_equal "Ascension", (Holidays.on(Date.civil(2007, 5, 17), [:fr])[0] || {})[:name]
19
19
 
20
- assert_equal "Lundi de Pentecôte", (Holidays.on(Date.civil(2007, 5, 28), [:fr])[0] || {})[:name]
20
+ assert_equal "Pentecôte", (Holidays.on(Date.civil(2007, 5, 27), [:fr])[0] || {})[:name]
21
21
 
22
22
  assert_equal "Fête nationale", (Holidays.on(Date.civil(2007, 7, 14), [:fr])[0] || {})[:name]
23
23
 
@@ -31,11 +31,11 @@ class FrDefinitionTests < Test::Unit::TestCase # :nodoc:
31
31
 
32
32
  assert_nil (Holidays.on(Date.civil(2007, 4, 8), [:fr])[0] || {})[:name]
33
33
 
34
- assert_nil (Holidays.on(Date.civil(2007, 5, 27), [:fr])[0] || {})[:name]
34
+ assert_nil (Holidays.on(Date.civil(2007, 5, 28), [:fr])[0] || {})[:name]
35
35
 
36
36
  assert_equal "Pâques", (Holidays.on(Date.civil(2007, 4, 8), [:fr], [:informal])[0] || {})[:name]
37
37
 
38
- assert_equal "Pentecôte", (Holidays.on(Date.civil(2007, 5, 27), [:fr], [:informal])[0] || {})[:name]
38
+ assert_equal "Lundi de Pentecôte", (Holidays.on(Date.civil(2007, 5, 28), [:fr], [:informal])[0] || {})[:name]
39
39
 
40
40
  assert_equal "Saint-Étienne", (Holidays.on(Date.civil(2017, 12, 26), [:fr_a, :fr_m], [:informal])[0] || {})[:name]
41
41
 
@@ -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]
@@ -31,6 +35,22 @@ class GbDefinitionTests < Test::Unit::TestCase # :nodoc:
31
35
 
32
36
  assert_equal "St. Patrick's Day", (Holidays.on(Date.civil(2019, 3, 18), [:gb_nir], [:observed, :informal])[0] || {})[:name]
33
37
 
38
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2020, 7, 12), [:gb_nir])[0] || {})[:name]
39
+
40
+ assert_nil (Holidays.on(Date.civil(2020, 7, 12), [:gb_nir], [:observed])[0] || {})[:name]
41
+
42
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2020, 7, 13), [:gb_nir], [:observed])[0] || {})[:name]
43
+
44
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2008, 7, 12), [:gb_nir])[0] || {})[:name]
45
+
46
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2008, 7, 14), [:gb_nir], [:observed])[0] || {})[:name]
47
+
48
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2021, 7, 12), [:gb_nir])[0] || {})[:name]
49
+
50
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2021, 7, 12), [:gb_nir], [:observed])[0] || {})[:name]
51
+
52
+ assert_nil (Holidays.on(Date.civil(2021, 7, 13), [:gb_nir], [:observed])[0] || {})[:name]
53
+
34
54
  assert_equal "St. Andrew's Day", (Holidays.on(Date.civil(2006, 11, 30), [:gb_sct], [:informal])[0] || {})[:name]
35
55
 
36
56
  assert_equal "St. Andrew's Day", (Holidays.on(Date.civil(2006, 11, 30), [:gb_sct], [:informal, :observed])[0] || {})[:name]
@@ -113,5 +133,27 @@ class GbDefinitionTests < Test::Unit::TestCase # :nodoc:
113
133
 
114
134
  assert_equal "Bank Holiday", (Holidays.on(Date.civil(2018, 8, 27), [:je])[0] || {})[:name]
115
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 for the Coronation of King Charles III", (Holidays.on(Date.civil(2023, 5, 8), [:gb])[0] || {})[:name]
149
+
150
+ assert_nil (Holidays.on(Date.civil(2024, 5, 8), [:gb])[0] || {})[:name]
151
+
152
+ assert_nil (Holidays.on(Date.civil(2022, 5, 8), [:gb])[0] || {})[:name]
153
+
154
+ assert_equal "Bank Holiday", (Holidays.on(Date.civil(2023, 5, 29), [:gb])[0] || {})[:name]
155
+
156
+ assert_equal "Bank Holiday for the Coronation of King Charles III", (Holidays.on(Date.civil(2023, 5, 8), [:gb])[0] || {})[:name]
157
+
116
158
  end
117
159
  end
@@ -3,39 +3,39 @@ 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/el.yaml
7
- class ElDefinitionTests < Test::Unit::TestCase # :nodoc:
6
+ # Definitions loaded: definitions/gr.yaml
7
+ class GrDefinitionTests < Test::Unit::TestCase # :nodoc:
8
8
 
9
- def test_el
10
- assert_equal "Πρωτοχρονιά", (Holidays.on(Date.civil(2011, 1, 1), [:el], [:informal])[0] || {})[:name]
9
+ def test_gr
10
+ assert_equal "Πρωτοχρονιά", (Holidays.on(Date.civil(2011, 1, 1), [:gr], [:informal])[0] || {})[:name]
11
11
 
12
- assert_equal "Θεοφάνεια", (Holidays.on(Date.civil(2011, 1, 6), [:el], [:informal])[0] || {})[:name]
12
+ assert_equal "Θεοφάνεια", (Holidays.on(Date.civil(2011, 1, 6), [:gr], [:informal])[0] || {})[:name]
13
13
 
14
- assert_equal "Μεγάλη Παρασκευή", (Holidays.on(Date.civil(2011, 4, 22), [:el], [:informal])[0] || {})[:name]
14
+ assert_equal "Μεγάλη Παρασκευή", (Holidays.on(Date.civil(2011, 4, 22), [:gr], [:informal])[0] || {})[:name]
15
15
 
16
- assert_equal "Μεγάλο Σάββατο", (Holidays.on(Date.civil(1970, 4, 25), [:el], [:informal])[0] || {})[:name]
16
+ assert_equal "Μεγάλο Σάββατο", (Holidays.on(Date.civil(1970, 4, 25), [:gr], [:informal])[0] || {})[:name]
17
17
 
18
- assert_equal "Κυριακή του Πάσχα", (Holidays.on(Date.civil(1985, 4, 14), [:el], [:informal])[0] || {})[:name]
18
+ assert_equal "Κυριακή του Πάσχα", (Holidays.on(Date.civil(1985, 4, 14), [:gr], [:informal])[0] || {})[:name]
19
19
 
20
- assert_equal "Κυριακή του Πάσχα", (Holidays.on(Date.civil(2011, 4, 24), [:el], [:informal])[0] || {})[:name]
20
+ assert_equal "Κυριακή του Πάσχα", (Holidays.on(Date.civil(2011, 4, 24), [:gr], [:informal])[0] || {})[:name]
21
21
 
22
- assert_equal "Κυριακή του Πάσχα", (Holidays.on(Date.civil(2027, 5, 2), [:el], [:informal])[0] || {})[:name]
22
+ assert_equal "Κυριακή του Πάσχα", (Holidays.on(Date.civil(2027, 5, 2), [:gr], [:informal])[0] || {})[:name]
23
23
 
24
- assert_equal "Δευτέρα του Πάσχα", (Holidays.on(Date.civil(2046, 4, 30), [:el], [:informal])[0] || {})[:name]
24
+ assert_equal "Δευτέρα του Πάσχα", (Holidays.on(Date.civil(2046, 4, 30), [:gr], [:informal])[0] || {})[:name]
25
25
 
26
- assert_equal "Πρωτομαγιά", (Holidays.on(Date.civil(2011, 5, 1), [:el], [:informal])[0] || {})[:name]
26
+ assert_equal "Πρωτομαγιά", (Holidays.on(Date.civil(2011, 5, 1), [:gr], [:informal])[0] || {})[:name]
27
27
 
28
- assert_equal "Αγίου Πνεύματος", (Holidays.on(Date.civil(2011, 6, 13), [:el], [:informal])[0] || {})[:name]
28
+ assert_equal "Αγίου Πνεύματος", (Holidays.on(Date.civil(2011, 6, 13), [:gr], [:informal])[0] || {})[:name]
29
29
 
30
- assert_equal "Αγίου Πνεύματος", (Holidays.on(Date.civil(2012, 6, 4), [:el], [:informal])[0] || {})[:name]
30
+ assert_equal "Αγίου Πνεύματος", (Holidays.on(Date.civil(2012, 6, 4), [:gr], [:informal])[0] || {})[:name]
31
31
 
32
- assert_equal "Καθαρά Δευτέρα", (Holidays.on(Date.civil(2011, 3, 7), [:el], [:informal])[0] || {})[:name]
32
+ assert_equal "Καθαρά Δευτέρα", (Holidays.on(Date.civil(2011, 3, 7), [:gr], [:informal])[0] || {})[:name]
33
33
 
34
- assert_equal "Καθαρά Δευτέρα", (Holidays.on(Date.civil(2012, 2, 27), [:el], [:informal])[0] || {})[:name]
34
+ assert_equal "Καθαρά Δευτέρα", (Holidays.on(Date.civil(2012, 2, 27), [:gr], [:informal])[0] || {})[:name]
35
35
 
36
- assert_equal "Χριστούγεννα", (Holidays.on(Date.civil(2011, 12, 25), [:el], [:informal])[0] || {})[:name]
36
+ assert_equal "Χριστούγεννα", (Holidays.on(Date.civil(2011, 12, 25), [:gr], [:informal])[0] || {})[:name]
37
37
 
38
- assert_equal "Δεύτερη ημέρα των Χριστουγέννων", (Holidays.on(Date.civil(2011, 12, 26), [:el], [:informal])[0] || {})[:name]
38
+ assert_equal "Δεύτερη ημέρα των Χριστουγέννων", (Holidays.on(Date.civil(2011, 12, 26), [:gr], [:informal])[0] || {})[:name]
39
39
 
40
40
  end
41
41
  end
@@ -9,21 +9,21 @@ class HrDefinitionTests < Test::Unit::TestCase # :nodoc:
9
9
  def test_hr
10
10
  assert_equal "Nova godina", (Holidays.on(Date.civil(2012, 1, 1), [:hr], [:informal])[0] || {})[:name]
11
11
 
12
- assert_equal "Sveta tri kralja", (Holidays.on(Date.civil(2012, 1, 6), [:hr], [:informal])[0] || {})[:name]
12
+ assert_equal "Bogojavljenje ili Sveta tri kralja", (Holidays.on(Date.civil(2012, 1, 6), [:hr], [:informal])[0] || {})[:name]
13
13
 
14
- assert_equal "Međunarodni praznik rada", (Holidays.on(Date.civil(2012, 5, 1), [:hr], [:informal])[0] || {})[:name]
14
+ assert_equal "Praznik rada", (Holidays.on(Date.civil(2012, 5, 1), [:hr], [:informal])[0] || {})[:name]
15
15
 
16
16
  assert_equal "Dan antifašističke borbe", (Holidays.on(Date.civil(2012, 6, 22), [:hr], [:informal])[0] || {})[:name]
17
17
 
18
- assert_equal "Dan državnosti", (Holidays.on(Date.civil(2012, 6, 25), [:hr], [:informal])[0] || {})[:name]
18
+ assert_equal "Dan državnosti", (Holidays.on(Date.civil(2020, 5, 30), [:hr], [:informal])[0] || {})[:name]
19
19
 
20
- assert_equal "Dan pobjede i domovinske zahvalnosti i dan hrvatskih branitelja", (Holidays.on(Date.civil(2012, 8, 5), [:hr], [:informal])[0] || {})[:name]
20
+ assert_equal "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja", (Holidays.on(Date.civil(2012, 8, 5), [:hr], [:informal])[0] || {})[:name]
21
21
 
22
22
  assert_equal "Velika Gospa", (Holidays.on(Date.civil(2012, 8, 15), [:hr], [:informal])[0] || {})[:name]
23
23
 
24
- assert_equal "Dan neovisnosti", (Holidays.on(Date.civil(2012, 10, 8), [:hr], [:informal])[0] || {})[:name]
24
+ 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]
25
25
 
26
- assert_equal "Dan svih svetih", (Holidays.on(Date.civil(2012, 11, 1), [:hr], [:informal])[0] || {})[:name]
26
+ assert_equal "Svi sveti", (Holidays.on(Date.civil(2012, 11, 1), [:hr], [:informal])[0] || {})[:name]
27
27
 
28
28
  assert_equal "Božić", (Holidays.on(Date.civil(2012, 12, 25), [:hr], [:informal])[0] || {})[:name]
29
29
 
@@ -13,15 +13,15 @@ class HuDefinitionTests < Test::Unit::TestCase # :nodoc:
13
13
 
14
14
  assert_equal "1848/49-es forradalom és szabadságharc ünnepe", (Holidays.on(Date.civil(2012, 3, 15), [:hu], [:informal])[0] || {})[:name]
15
15
 
16
- assert_equal "Húsvét hétfő", (Holidays.on(Date.civil(2011, 4, 25), [:hu], [:informal])[0] || {})[:name]
16
+ assert_equal "Húsvéthétfő", (Holidays.on(Date.civil(2011, 4, 25), [:hu], [:informal])[0] || {})[:name]
17
17
 
18
- assert_equal "Húsvét hétfő", (Holidays.on(Date.civil(2012, 4, 9), [:hu], [:informal])[0] || {})[:name]
18
+ assert_equal "Húsvéthétfő", (Holidays.on(Date.civil(2012, 4, 9), [:hu], [:informal])[0] || {})[:name]
19
19
 
20
20
  assert_equal "A munka ünnepe", (Holidays.on(Date.civil(2012, 5, 1), [:hu], [:informal])[0] || {})[:name]
21
21
 
22
- assert_equal "Pünkösd hétfő", (Holidays.on(Date.civil(2011, 6, 13), [:hu], [:informal])[0] || {})[:name]
22
+ assert_equal "Pünkösdhétfő", (Holidays.on(Date.civil(2011, 6, 13), [:hu], [:informal])[0] || {})[:name]
23
23
 
24
- assert_equal "Pünkösd hétfő", (Holidays.on(Date.civil(2012, 5, 28), [:hu], [:informal])[0] || {})[:name]
24
+ assert_equal "Pünkösdhétfő", (Holidays.on(Date.civil(2012, 5, 28), [:hu], [:informal])[0] || {})[:name]
25
25
 
26
26
  assert_equal "Az államalapítás ünnepe", (Holidays.on(Date.civil(2012, 8, 20), [:hu], [:informal])[0] || {})[:name]
27
27
 
@@ -35,5 +35,13 @@ class HuDefinitionTests < Test::Unit::TestCase # :nodoc:
35
35
 
36
36
  assert_nil (Holidays.on(Date.civil(2012, 3, 14), [:hu])[0] || {})[:name]
37
37
 
38
+ assert_equal "Húsvéthétfő", (Holidays.on(Date.civil(2016, 3, 28), [:hu])[0] || {})[:name]
39
+
40
+ assert_nil (Holidays.on(Date.civil(2016, 3, 25), [:hu])[0] || {})[:name]
41
+
42
+ assert_equal "Húsvéthétfő", (Holidays.on(Date.civil(2017, 4, 17), [:hu])[0] || {})[:name]
43
+
44
+ assert_equal "Nagypéntek", (Holidays.on(Date.civil(2017, 4, 14), [:hu])[0] || {})[:name]
45
+
38
46
  end
39
47
  end
@@ -17,14 +17,34 @@ class ItDefinitionTests < Test::Unit::TestCase # :nodoc:
17
17
 
18
18
  assert_equal "Festa della Liberazione", (Holidays.on(Date.civil(2007, 4, 25), [:it], [:informal])[0] || {})[:name]
19
19
 
20
+ assert_equal "Festa di San Liberale", (Holidays.on(Date.civil(2019, 4, 27), [:it_tv], [:informal])[0] || {})[:name]
21
+
20
22
  assert_equal "Festa dei Lavoratori", (Holidays.on(Date.civil(2007, 5, 1), [:it], [:informal])[0] || {})[:name]
21
23
 
24
+ assert_equal "Festa di San Zeno", (Holidays.on(Date.civil(2019, 5, 21), [:it_vr], [:informal])[0] || {})[:name]
25
+
22
26
  assert_equal "Festa della Repubblica", (Holidays.on(Date.civil(2007, 6, 2), [:it], [:informal])[0] || {})[:name]
23
27
 
28
+ assert_equal "Festa di Sant'Antonio di Padova", (Holidays.on(Date.civil(2019, 6, 13), [:it_pd], [:informal])[0] || {})[:name]
29
+
30
+ assert_equal "Festa di San Giovanni Battista", (Holidays.on(Date.civil(2019, 6, 24), [:it_fi, :it_ge, :it_to], [:informal])[0] || {})[:name]
31
+
32
+ assert_nil (Holidays.on(Date.civil(2019, 6, 24), [:it])[0] || {})[:name]
33
+
34
+ assert_equal "Festa di San Pietro e Paolo", (Holidays.on(Date.civil(2019, 6, 29), [:it_rm], [:informal])[0] || {})[:name]
35
+
36
+ assert_nil (Holidays.on(Date.civil(2019, 6, 29), [:it])[0] || {})[:name]
37
+
24
38
  assert_equal "Assunzione", (Holidays.on(Date.civil(2007, 8, 15), [:it], [:informal])[0] || {})[:name]
25
39
 
40
+ assert_equal "Festa della Madonna di Monte Berico", (Holidays.on(Date.civil(2019, 9, 8), [:it_vi], [:informal])[0] || {})[:name]
41
+
26
42
  assert_equal "Ognissanti", (Holidays.on(Date.civil(2007, 11, 1), [:it], [:informal])[0] || {})[:name]
27
43
 
44
+ assert_equal "Festa di San Martino", (Holidays.on(Date.civil(2019, 11, 11), [:it_bl], [:informal])[0] || {})[:name]
45
+
46
+ assert_equal "Festa di San Bellino", (Holidays.on(Date.civil(2019, 11, 26), [:it_ro], [:informal])[0] || {})[:name]
47
+
28
48
  assert_equal "Immacolata Concezione", (Holidays.on(Date.civil(2007, 12, 8), [:it], [:informal])[0] || {})[:name]
29
49
 
30
50
  assert_equal "Natale", (Holidays.on(Date.civil(2007, 12, 25), [:it], [:informal])[0] || {})[:name]
@@ -109,6 +109,14 @@ class JpDefinitionTests < Test::Unit::TestCase # :nodoc:
109
109
 
110
110
  assert_equal "海の日", (Holidays.on(Date.civil(2014, 7, 21), [:jp])[0] || {})[:name]
111
111
 
112
+ assert_equal "海の日", (Holidays.on(Date.civil(2019, 7, 15), [:jp])[0] || {})[:name]
113
+
114
+ assert_nil (Holidays.on(Date.civil(2020, 7, 20), [:jp])[0] || {})[:name]
115
+
116
+ assert_equal "海の日", (Holidays.on(Date.civil(2020, 7, 23), [:jp])[0] || {})[:name]
117
+
118
+ assert_equal "海の日", (Holidays.on(Date.civil(2021, 7, 22), [:jp])[0] || {})[:name]
119
+
112
120
  assert_equal "山の日", (Holidays.on(Date.civil(2016, 8, 11), [:jp])[0] || {})[:name]
113
121
 
114
122
  assert_equal "山の日", (Holidays.on(Date.civil(2017, 8, 11), [:jp])[0] || {})[:name]
@@ -117,9 +125,13 @@ class JpDefinitionTests < Test::Unit::TestCase # :nodoc:
117
125
 
118
126
  assert_equal "山の日", (Holidays.on(Date.civil(2019, 8, 11), [:jp])[0] || {})[:name]
119
127
 
120
- assert_equal "山の日", (Holidays.on(Date.civil(2020, 8, 11), [:jp])[0] || {})[:name]
128
+ assert_equal "山の日", (Holidays.on(Date.civil(2020, 8, 10), [:jp])[0] || {})[:name]
129
+
130
+ assert_nil (Holidays.on(Date.civil(2020, 8, 11), [:jp])[0] || {})[:name]
121
131
 
122
- assert_equal "山の日", (Holidays.on(Date.civil(2021, 8, 11), [:jp])[0] || {})[:name]
132
+ assert_equal "山の日", (Holidays.on(Date.civil(2021, 8, 8), [:jp])[0] || {})[:name]
133
+
134
+ assert_equal "振替休日", (Holidays.on(Date.civil(2021, 8, 9), [:jp])[0] || {})[:name]
123
135
 
124
136
  assert_equal "山の日", (Holidays.on(Date.civil(2022, 8, 11), [:jp])[0] || {})[:name]
125
137
 
@@ -135,5 +147,13 @@ class JpDefinitionTests < Test::Unit::TestCase # :nodoc:
135
147
 
136
148
  assert_equal "天皇誕生日", (Holidays.on(Date.civil(2020, 2, 23), [:jp])[0] || {})[:name]
137
149
 
150
+ assert_equal "体育の日", (Holidays.on(Date.civil(2019, 10, 14), [:jp])[0] || {})[:name]
151
+
152
+ assert_equal "スポーツの日", (Holidays.on(Date.civil(2020, 7, 24), [:jp])[0] || {})[:name]
153
+
154
+ assert_nil (Holidays.on(Date.civil(2020, 10, 12), [:jp])[0] || {})[:name]
155
+
156
+ assert_equal "スポーツの日", (Holidays.on(Date.civil(2021, 7, 23), [:jp])[0] || {})[:name]
157
+
138
158
  end
139
159
  end
@@ -0,0 +1,31 @@
1
+ # encoding: utf-8
2
+ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
3
+
4
+ # This file is generated by the Ruby Holiday gem.
5
+ #
6
+ # Definitions loaded: definitions/ke.yaml
7
+ class KeDefinitionTests < Test::Unit::TestCase # :nodoc:
8
+
9
+ def test_ke
10
+ assert_equal "Good Friday", (Holidays.on(Date.civil(2008, 3, 21), [:ke])[0] || {})[:name]
11
+
12
+ assert_equal "Easter Monday", (Holidays.on(Date.civil(2008, 3, 24), [:ke])[0] || {})[:name]
13
+
14
+ assert_equal "New Year's Day", (Holidays.on(Date.civil(2008, 1, 1), [:ke])[0] || {})[:name]
15
+
16
+ assert_equal "Labour Day", (Holidays.on(Date.civil(2008, 5, 1), [:ke])[0] || {})[:name]
17
+
18
+ assert_equal "Madaraka Day", (Holidays.on(Date.civil(2019, 6, 1), [:ke])[0] || {})[:name]
19
+
20
+ assert_equal "Huduma Day", (Holidays.on(Date.civil(2018, 10, 10), [:ke])[0] || {})[:name]
21
+
22
+ assert_equal "Mashujaa Day", (Holidays.on(Date.civil(2018, 10, 20), [:ke])[0] || {})[:name]
23
+
24
+ assert_equal "Jamhuri Day", (Holidays.on(Date.civil(2019, 12, 12), [:ke])[0] || {})[:name]
25
+
26
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2008, 12, 25), [:ke])[0] || {})[:name]
27
+
28
+ assert_equal "Utamaduni Day", (Holidays.on(Date.civil(2018, 12, 26), [:ke])[0] || {})[:name]
29
+
30
+ end
31
+ end
@@ -0,0 +1,39 @@
1
+ # encoding: utf-8
2
+ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
3
+
4
+ # This file is generated by the Ruby Holiday gem.
5
+ #
6
+ # Definitions loaded: definitions/kz.yaml
7
+ class KzDefinitionTests < Test::Unit::TestCase # :nodoc:
8
+
9
+ def test_kz
10
+ assert_equal "Jańa jyl", (Holidays.on(Date.civil(2020, 1, 1), [:kz])[0] || {})[:name]
11
+
12
+ assert_equal "Jańa jyl", (Holidays.on(Date.civil(2020, 1, 2), [:kz])[0] || {})[:name]
13
+
14
+ assert_equal "Halyqaralyq áıelder kúni", (Holidays.on(Date.civil(2020, 3, 8), [:kz])[0] || {})[:name]
15
+
16
+ assert_equal "Naýryz Meıramy", (Holidays.on(Date.civil(2020, 3, 21), [:kz])[0] || {})[:name]
17
+
18
+ assert_equal "Naýryz Meıramy", (Holidays.on(Date.civil(2020, 3, 22), [:kz])[0] || {})[:name]
19
+
20
+ assert_equal "Naýryz Meıramy", (Holidays.on(Date.civil(2020, 3, 23), [:kz])[0] || {})[:name]
21
+
22
+ assert_equal "Qazaqstan halqynyń birligi merekesi", (Holidays.on(Date.civil(2020, 5, 1), [:kz])[0] || {})[:name]
23
+
24
+ assert_equal "Otan Qorǵaýshy kuni", (Holidays.on(Date.civil(2020, 5, 7), [:kz])[0] || {})[:name]
25
+
26
+ assert_equal "Jeńis kúni", (Holidays.on(Date.civil(2020, 5, 9), [:kz])[0] || {})[:name]
27
+
28
+ assert_equal "Astana kúni", (Holidays.on(Date.civil(2020, 7, 6), [:kz])[0] || {})[:name]
29
+
30
+ assert_equal "Qazaqstan Respýblıkasynyń Konstıtýcıyasy kúni", (Holidays.on(Date.civil(2020, 8, 30), [:kz])[0] || {})[:name]
31
+
32
+ assert_equal "Túńǵysh Prezıdent kúni", (Holidays.on(Date.civil(2020, 12, 1), [:kz])[0] || {})[:name]
33
+
34
+ assert_equal "Táýelsizdik kúni", (Holidays.on(Date.civil(2020, 12, 16), [:kz])[0] || {})[:name]
35
+
36
+ assert_equal "Táýelsizdik kúni", (Holidays.on(Date.civil(2020, 12, 17), [:kz])[0] || {})[:name]
37
+
38
+ end
39
+ end
@@ -59,5 +59,7 @@ class LtDefinitionTests < Test::Unit::TestCase # :nodoc:
59
59
 
60
60
  assert_equal "Antroji Kalėdų diena", (Holidays.on(Date.civil(2012, 12, 26), [:lt])[0] || {})[:name]
61
61
 
62
+ assert_equal "Mirusiųjų atminimo (Vėlinių) diena", (Holidays.on(Date.civil(2024, 11, 2), [:lt])[0] || {})[:name]
63
+
62
64
  end
63
65
  end
@@ -25,5 +25,11 @@ class LuDefinitionTests < Test::Unit::TestCase # :nodoc:
25
25
 
26
26
  assert_equal "Péngschtméindeg", (Holidays.on(Date.civil(2008, 5, 11), [:lu], [:informal])[0] || {})[:name]
27
27
 
28
+ assert_equal "Dag vun der Aarbecht", (Holidays.on(Date.civil(2019, 5, 1), [:lu])[0] || {})[:name]
29
+
30
+ assert_equal "Europadag", (Holidays.on(Date.civil(2019, 5, 9), [:lu])[0] || {})[:name]
31
+
32
+ assert_nil (Holidays.on(Date.civil(2018, 5, 9), [:lu])[0] || {})[:name]
33
+
28
34
  end
29
35
  end