holidays 4.2.0 → 8.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (330) hide show
  1. checksums.yaml +5 -5
  2. data/.gitmodules +3 -0
  3. data/CHANGELOG.md +195 -0
  4. data/Makefile +45 -0
  5. data/README.md +253 -77
  6. data/Rakefile +10 -11
  7. data/bin/console +0 -0
  8. data/bin/setup +1 -0
  9. data/doc/CONTRIBUTING.md +72 -0
  10. data/doc/MAINTAINERS.md +81 -0
  11. data/{REFERENCES → doc/REFERENCES} +0 -0
  12. data/holidays.gemspec +9 -9
  13. data/lib/generated_definitions/MANIFEST +26 -4
  14. data/lib/generated_definitions/REGIONS.rb +3 -1
  15. data/lib/generated_definitions/ar.rb +4 -10
  16. data/lib/generated_definitions/at.rb +3 -9
  17. data/lib/generated_definitions/au.rb +32 -25
  18. data/lib/generated_definitions/be_fr.rb +2 -8
  19. data/lib/generated_definitions/be_nl.rb +2 -8
  20. data/lib/generated_definitions/bg.rb +2 -8
  21. data/lib/generated_definitions/br.rb +2 -8
  22. data/lib/generated_definitions/ca.rb +33 -32
  23. data/lib/generated_definitions/ch.rb +17 -11
  24. data/lib/generated_definitions/cl.rb +38 -12
  25. data/lib/generated_definitions/co.rb +121 -0
  26. data/lib/generated_definitions/cr.rb +2 -8
  27. data/lib/generated_definitions/cz.rb +2 -8
  28. data/lib/generated_definitions/de.rb +11 -14
  29. data/lib/generated_definitions/dk.rb +2 -8
  30. data/lib/generated_definitions/{ecb_target.rb → ecbtarget.rb} +10 -16
  31. data/lib/generated_definitions/ee.rb +36 -0
  32. data/lib/generated_definitions/el.rb +2 -8
  33. data/lib/generated_definitions/es.rb +8 -11
  34. data/lib/generated_definitions/europe.rb +121 -51
  35. data/lib/generated_definitions/federalreserve.rb +34 -0
  36. data/lib/generated_definitions/{federal_reserve.rb → federalreservebanks.rb} +14 -20
  37. data/lib/generated_definitions/fedex.rb +3 -9
  38. data/lib/generated_definitions/fi.rb +2 -8
  39. data/lib/generated_definitions/fr.rb +6 -10
  40. data/lib/generated_definitions/gb.rb +12 -16
  41. data/lib/generated_definitions/ge.rb +41 -0
  42. data/lib/generated_definitions/hk.rb +106 -0
  43. data/lib/generated_definitions/hr.rb +10 -14
  44. data/lib/generated_definitions/hu.rb +4 -9
  45. data/lib/generated_definitions/ie.rb +3 -17
  46. data/lib/generated_definitions/is.rb +3 -9
  47. data/lib/generated_definitions/it.rb +16 -13
  48. data/lib/generated_definitions/jp.rb +47 -36
  49. data/lib/generated_definitions/kr.rb +40 -0
  50. data/lib/generated_definitions/kz.rb +38 -0
  51. data/lib/generated_definitions/li.rb +2 -8
  52. data/lib/generated_definitions/lt.rb +2 -8
  53. data/lib/generated_definitions/lu.rb +35 -0
  54. data/lib/generated_definitions/lv.rb +52 -0
  55. data/lib/generated_definitions/ma.rb +2 -8
  56. data/lib/generated_definitions/mt_en.rb +38 -0
  57. data/lib/generated_definitions/mt_mt.rb +38 -0
  58. data/lib/generated_definitions/mx.rb +6 -12
  59. data/lib/generated_definitions/my.rb +30 -0
  60. data/lib/generated_definitions/nerc.rb +2 -8
  61. data/lib/generated_definitions/ng.rb +33 -0
  62. data/lib/generated_definitions/nl.rb +2 -8
  63. data/lib/generated_definitions/no.rb +2 -8
  64. data/lib/generated_definitions/northamerica.rb +223 -0
  65. data/lib/generated_definitions/nyse.rb +3 -9
  66. data/lib/generated_definitions/nz.rb +2 -9
  67. data/lib/generated_definitions/pe.rb +43 -0
  68. data/lib/generated_definitions/ph.rb +4 -10
  69. data/lib/generated_definitions/pl.rb +2 -8
  70. data/lib/generated_definitions/pt.rb +12 -12
  71. data/lib/generated_definitions/ro.rb +6 -9
  72. data/lib/generated_definitions/rs_cyrl.rb +39 -0
  73. data/lib/generated_definitions/rs_la.rb +39 -0
  74. data/lib/generated_definitions/ru.rb +37 -0
  75. data/lib/generated_definitions/scandinavia.rb +3 -9
  76. data/lib/generated_definitions/se.rb +2 -8
  77. data/lib/generated_definitions/sg.rb +2 -8
  78. data/lib/generated_definitions/si.rb +2 -8
  79. data/lib/generated_definitions/sk.rb +2 -8
  80. data/lib/generated_definitions/southamerica.rb +228 -0
  81. data/lib/generated_definitions/th.rb +36 -0
  82. data/lib/generated_definitions/tn.rb +32 -0
  83. data/lib/generated_definitions/tr.rb +64 -0
  84. data/lib/generated_definitions/ua.rb +37 -0
  85. data/lib/generated_definitions/{united_nations.rb → unitednations.rb} +61 -67
  86. data/lib/generated_definitions/ups.rb +3 -9
  87. data/lib/generated_definitions/us.rb +113 -23
  88. data/lib/generated_definitions/ve.rb +2 -8
  89. data/lib/generated_definitions/vi.rb +6 -11
  90. data/lib/generated_definitions/za.rb +2 -8
  91. data/lib/holidays/core_extensions/date.rb +21 -3
  92. data/lib/holidays/core_extensions/time.rb +23 -0
  93. data/lib/holidays/date_calculator/day_of_month.rb +3 -3
  94. data/lib/holidays/date_calculator/lunar_date.rb +371 -0
  95. data/lib/holidays/date_calculator/weekend_modifier.rb +0 -7
  96. data/lib/holidays/definition/context/function_processor.rb +91 -0
  97. data/lib/holidays/definition/context/generator.rb +37 -96
  98. data/lib/holidays/definition/context/load.rb +29 -0
  99. data/lib/holidays/definition/context/merger.rb +0 -4
  100. data/lib/holidays/definition/decorator/test.rb +37 -0
  101. data/lib/holidays/definition/entity/test.rb +11 -0
  102. data/lib/holidays/definition/generator/module.rb +54 -0
  103. data/lib/holidays/definition/generator/regions.rb +55 -0
  104. data/lib/holidays/definition/generator/test.rb +51 -0
  105. data/lib/holidays/definition/parser/custom_method.rb +3 -5
  106. data/lib/holidays/definition/parser/test.rb +86 -0
  107. data/lib/holidays/definition/repository/cache.rb +23 -9
  108. data/lib/holidays/definition/repository/holidays_by_month.rb +10 -2
  109. data/lib/holidays/definition/repository/proc_result_cache.rb +1 -1
  110. data/lib/holidays/definition/repository/regions.rb +23 -13
  111. data/lib/holidays/definition/validator/custom_method.rb +1 -1
  112. data/lib/holidays/definition/validator/region.rb +2 -11
  113. data/lib/holidays/definition/validator/test.rb +71 -0
  114. data/lib/holidays/errors.rb +5 -0
  115. data/lib/holidays/factory/date_calculator.rb +42 -0
  116. data/lib/holidays/factory/definition.rb +143 -0
  117. data/lib/holidays/factory/finder.rb +70 -0
  118. data/lib/holidays/finder/context/between.rb +45 -0
  119. data/lib/holidays/{use_case → finder}/context/dates_driver_builder.rb +11 -15
  120. data/lib/holidays/finder/context/next_holiday.rb +57 -0
  121. data/lib/holidays/finder/context/parse_options.rb +104 -0
  122. data/lib/holidays/finder/context/search.rb +110 -0
  123. data/lib/holidays/finder/context/year_holiday.rb +57 -0
  124. data/lib/holidays/finder/rules/in_region.rb +31 -0
  125. data/lib/holidays/finder/rules/year_range.rb +58 -0
  126. data/lib/holidays/load_all_definitions.rb +16 -17
  127. data/lib/holidays/version.rb +1 -1
  128. data/lib/holidays.rb +50 -125
  129. data/test/coverage_report.rb +26 -0
  130. data/test/data/test_custom_informal_holidays_defs.yaml +11 -0
  131. data/test/data/test_custom_year_range_holiday_defs.yaml +13 -10
  132. data/test/data/test_invalid_region.rb +15 -0
  133. data/test/data/test_multiple_custom_holiday_defs.yaml +7 -4
  134. data/test/data/test_multiple_regions_with_conflicts_region_1.yaml +38 -0
  135. data/test/data/test_multiple_regions_with_conflicts_region_2.yaml +38 -0
  136. data/test/data/test_region.rb +15 -0
  137. data/test/data/test_single_custom_holiday_defs.yaml +7 -4
  138. data/test/data/test_single_custom_holiday_with_custom_procs.yaml +11 -7
  139. data/test/defs/test_defs_ar.rb +41 -19
  140. data/test/defs/test_defs_at.rb +18 -11
  141. data/test/defs/test_defs_au.rb +185 -126
  142. data/test/defs/test_defs_be_fr.rb +33 -14
  143. data/test/defs/test_defs_be_nl.rb +33 -14
  144. data/test/defs/test_defs_bg.rb +29 -17
  145. data/test/defs/test_defs_br.rb +33 -19
  146. data/test/defs/test_defs_ca.rb +246 -136
  147. data/test/defs/test_defs_ch.rb +35 -23
  148. data/test/defs/test_defs_cl.rb +57 -27
  149. data/test/defs/test_defs_co.rb +113 -0
  150. data/test/defs/test_defs_cr.rb +17 -11
  151. data/test/defs/test_defs_cz.rb +25 -15
  152. data/test/defs/test_defs_de.rb +60 -59
  153. data/test/defs/test_defs_dk.rb +31 -19
  154. data/test/defs/test_defs_ecbtarget.rb +27 -0
  155. data/test/defs/test_defs_ee.rb +41 -0
  156. data/test/defs/test_defs_el.rb +29 -17
  157. data/test/defs/test_defs_es.rb +116 -52
  158. data/test/defs/test_defs_europe.rb +1382 -701
  159. data/test/defs/test_defs_federalreserve.rb +113 -0
  160. data/test/defs/test_defs_federalreservebanks.rb +247 -0
  161. data/test/defs/test_defs_fedex.rb +19 -12
  162. data/test/defs/test_defs_fi.rb +47 -27
  163. data/test/defs/test_defs_fr.rb +31 -18
  164. data/test/defs/test_defs_gb.rb +120 -51
  165. data/test/defs/test_defs_ge.rb +53 -0
  166. data/test/defs/test_defs_hk.rb +59 -0
  167. data/test/defs/test_defs_hr.rb +32 -18
  168. data/test/defs/test_defs_hu.rb +34 -16
  169. data/test/defs/test_defs_ie.rb +41 -25
  170. data/test/defs/test_defs_is.rb +39 -22
  171. data/test/defs/test_defs_it.rb +43 -14
  172. data/test/defs/test_defs_jp.rb +141 -55
  173. data/test/defs/test_defs_kr.rb +37 -0
  174. data/test/defs/test_defs_kz.rb +39 -0
  175. data/test/defs/test_defs_li.rb +20 -20
  176. data/test/defs/test_defs_lt.rb +51 -30
  177. data/test/defs/test_defs_lu.rb +35 -0
  178. data/test/defs/test_defs_lv.rb +90 -0
  179. data/test/defs/test_defs_ma.rb +17 -11
  180. data/test/defs/test_defs_mt_en.rb +41 -0
  181. data/test/defs/test_defs_mt_mt.rb +41 -0
  182. data/test/defs/test_defs_mx.rb +34 -23
  183. data/test/defs/test_defs_my.rb +23 -0
  184. data/test/defs/test_defs_nerc.rb +17 -11
  185. data/test/defs/test_defs_ng.rb +29 -0
  186. data/test/defs/test_defs_nl.rb +21 -13
  187. data/test/defs/test_defs_no.rb +31 -18
  188. data/test/defs/test_defs_northamerica.rb +644 -0
  189. data/test/defs/test_defs_nyse.rb +27 -11
  190. data/test/defs/test_defs_nz.rb +47 -28
  191. data/test/defs/test_defs_pe.rb +47 -0
  192. data/test/defs/test_defs_ph.rb +17 -13
  193. data/test/defs/test_defs_pl.rb +200 -119
  194. data/test/defs/test_defs_pt.rb +35 -15
  195. data/test/defs/test_defs_ro.rb +53 -24
  196. data/test/defs/test_defs_rs_cyrl.rb +46 -0
  197. data/test/defs/test_defs_rs_la.rb +46 -0
  198. data/test/defs/test_defs_ru.rb +34 -0
  199. data/test/defs/test_defs_scandinavia.rb +193 -116
  200. data/test/defs/test_defs_se.rb +47 -28
  201. data/test/defs/test_defs_sg.rb +13 -9
  202. data/test/defs/test_defs_si.rb +93 -24
  203. data/test/defs/test_defs_sk.rb +29 -17
  204. data/test/defs/test_defs_southamerica.rb +307 -0
  205. data/test/defs/test_defs_th.rb +33 -0
  206. data/test/defs/test_defs_tn.rb +27 -0
  207. data/test/defs/test_defs_tr.rb +60 -0
  208. data/test/defs/test_defs_ua.rb +41 -0
  209. data/test/defs/{test_defs_united_nations.rb → test_defs_unitednations.rb} +3 -4
  210. data/test/defs/test_defs_ups.rb +19 -12
  211. data/test/defs/test_defs_us.rb +370 -30
  212. data/test/defs/test_defs_ve.rb +23 -16
  213. data/test/defs/test_defs_vi.rb +10 -6
  214. data/test/defs/test_defs_za.rb +23 -14
  215. data/test/holidays/core_extensions/test_date.rb +3 -2
  216. data/test/holidays/core_extensions/test_date_time.rb +60 -0
  217. data/test/holidays/date_calculator/test_lunar_date.rb +89 -0
  218. data/test/holidays/definition/context/test_function_processor.rb +199 -0
  219. data/test/holidays/definition/context/test_generator.rb +66 -35
  220. data/test/holidays/definition/context/test_load.rb +37 -0
  221. data/test/holidays/definition/decorator/test_test.rb +123 -0
  222. data/test/holidays/definition/generator/test_module.rb +268 -0
  223. data/test/holidays/definition/generator/test_regions.rb +97 -0
  224. data/test/holidays/definition/generator/test_test.rb +113 -0
  225. data/test/holidays/definition/parser/test_custom_method.rb +6 -6
  226. data/test/holidays/definition/parser/test_test.rb +142 -0
  227. data/test/holidays/definition/repository/test_cache.rb +47 -6
  228. data/test/holidays/definition/repository/test_holidays_by_month.rb +121 -1
  229. data/test/holidays/definition/repository/test_proc_result_cache.rb +8 -1
  230. data/test/holidays/definition/repository/test_regions.rb +31 -13
  231. data/test/holidays/definition/validator/test_custom_method.rb +5 -0
  232. data/test/holidays/definition/validator/test_region.rb +16 -12
  233. data/test/holidays/definition/validator/test_test.rb +60 -0
  234. data/test/holidays/finder/context/test_between.rb +172 -0
  235. data/test/holidays/{use_case → finder}/context/test_dates_driver_builder.rb +2 -2
  236. data/test/holidays/finder/context/test_next_holiday.rb +156 -0
  237. data/test/holidays/finder/context/test_parse_options.rb +141 -0
  238. data/test/holidays/finder/context/test_search.rb +232 -0
  239. data/test/holidays/finder/context/test_year_holiday.rb +202 -0
  240. data/test/holidays/finder/rules/test_in_region.rb +42 -0
  241. data/test/holidays/finder/rules/test_year_range.rb +166 -0
  242. data/test/integration/README.md +9 -0
  243. data/test/{test_all_regions.rb → integration/test_all_regions.rb} +18 -4
  244. data/test/integration/test_any_holidays_during_work_week.rb +90 -0
  245. data/test/integration/test_available_regions.rb +23 -0
  246. data/test/{test_custom_holidays.rb → integration/test_custom_holidays.rb} +6 -6
  247. data/test/integration/test_custom_informal_holidays.rb +15 -0
  248. data/test/{test_custom_year_range_holidays.rb → integration/test_custom_year_range_holidays.rb} +1 -9
  249. data/test/{test_holidays.rb → integration/test_holidays.rb} +100 -69
  250. data/test/{test_holidays_between.rb → integration/test_holidays_between.rb} +19 -17
  251. data/test/integration/test_multiple_regions.rb +71 -0
  252. data/test/integration/test_multiple_regions_with_conflict.rb +29 -0
  253. data/test/integration/test_nonstandard_regions.rb +25 -0
  254. data/test/test_helper.rb +7 -3
  255. metadata +204 -132
  256. data/CONTRIBUTING.md +0 -41
  257. data/benchmark.rb +0 -8
  258. data/definitions/README.md +0 -353
  259. data/definitions/ar.yaml +0 -93
  260. data/definitions/at.yaml +0 -72
  261. data/definitions/au.yaml +0 -375
  262. data/definitions/be_fr.yaml +0 -69
  263. data/definitions/be_nl.yaml +0 -69
  264. data/definitions/bg.yaml +0 -127
  265. data/definitions/br.yaml +0 -77
  266. data/definitions/ca.yaml +0 -302
  267. data/definitions/ch.yaml +0 -193
  268. data/definitions/cl.yaml +0 -94
  269. data/definitions/cr.yaml +0 -65
  270. data/definitions/cz.yaml +0 -73
  271. data/definitions/de.yaml +0 -209
  272. data/definitions/dk.yaml +0 -130
  273. data/definitions/ecb_target.yaml +0 -44
  274. data/definitions/el.yaml +0 -84
  275. data/definitions/es.yaml +0 -203
  276. data/definitions/federal_reserve.yaml +0 -114
  277. data/definitions/fedex.yaml +0 -62
  278. data/definitions/fi.yaml +0 -115
  279. data/definitions/fr.yaml +0 -79
  280. data/definitions/gb.yaml +0 -151
  281. data/definitions/hr.yaml +0 -79
  282. data/definitions/hu.yaml +0 -63
  283. data/definitions/ie.yaml +0 -89
  284. data/definitions/index.yaml +0 -57
  285. data/definitions/is.yaml +0 -146
  286. data/definitions/it.yaml +0 -67
  287. data/definitions/jp.yaml +0 -316
  288. data/definitions/li.yaml +0 -107
  289. data/definitions/lt.yaml +0 -89
  290. data/definitions/ma.yaml +0 -52
  291. data/definitions/mx.yaml +0 -106
  292. data/definitions/nerc.yaml +0 -51
  293. data/definitions/nl.yaml +0 -73
  294. data/definitions/no.yaml +0 -90
  295. data/definitions/north_america_informal.yaml +0 -61
  296. data/definitions/nyse.yaml +0 -64
  297. data/definitions/nz.yaml +0 -163
  298. data/definitions/ph.yaml +0 -94
  299. data/definitions/pl.yaml +0 -320
  300. data/definitions/pt.yaml +0 -69
  301. data/definitions/ro.yaml +0 -78
  302. data/definitions/se.yaml +0 -120
  303. data/definitions/sg.yaml +0 -56
  304. data/definitions/si.yaml +0 -86
  305. data/definitions/sk.yaml +0 -80
  306. data/definitions/united_nations.yaml +0 -189
  307. data/definitions/ups.yaml +0 -62
  308. data/definitions/us.yaml +0 -103
  309. data/definitions/ve.yaml +0 -74
  310. data/definitions/vi.yaml +0 -29
  311. data/definitions/za.yaml +0 -80
  312. data/lib/generated_definitions/north_america.rb +0 -126
  313. data/lib/holidays/date_calculator_factory.rb +0 -35
  314. data/lib/holidays/definition_factory.rb +0 -86
  315. data/lib/holidays/option/context/parse_options.rb +0 -106
  316. data/lib/holidays/option_factory.rb +0 -15
  317. data/lib/holidays/use_case/context/between.rb +0 -45
  318. data/lib/holidays/use_case/context/context_common.rb +0 -123
  319. data/lib/holidays/use_case/context/next_holiday.rb +0 -54
  320. data/lib/holidays/use_case_factory.rb +0 -31
  321. data/test/defs/test_defs_ecb_target.rb +0 -23
  322. data/test/defs/test_defs_federal_reserve.rb +0 -69
  323. data/test/defs/test_defs_north_america.rb +0 -195
  324. data/test/holidays/option/context/test_parse_options.rb +0 -74
  325. data/test/holidays/test_date_calculator_factory.rb +0 -27
  326. data/test/holidays/test_definition_factory.rb +0 -49
  327. data/test/holidays/test_option_factory.rb +0 -9
  328. data/test/holidays/test_use_case_factory.rb +0 -13
  329. data/test/holidays/use_case/context/test_between.rb +0 -77
  330. data/test/test_multiple_regions.rb +0 -24
data/definitions/gb.yaml DELETED
@@ -1,151 +0,0 @@
1
- # Great Britain/United Kingdom holiday definitions for the Ruby Holiday gem.
2
- #
3
- # Including England, Wales, Scotland, N. Ireland, the Isle of Man, Guernsey
4
- # and Jersey.
5
- #
6
- # Updated: 2016-04-29
7
- # Sources:
8
- # - http://en.wikipedia.org/wiki/List_of_holidays_by_country#United_Kingdom_and_Crown_dependencies
9
- #
10
- # Notes:
11
- # - Jersey, Guernsey and the Isle of Man are encode with both their ISO 3166-1 and ISO 3-3166-2 codes.
12
- # - England and Wales together should be encoded as [gb_eng, gb_wls, gb_eaw...]
13
- # - For :gb_sct, St. Andrew's Day is 'informal' 2006 and earlier but a bank holiday from 2007 on.
14
- ---
15
- months:
16
- 0:
17
- - name: Good Friday
18
- regions: [gb]
19
- function: easter(year)
20
- function_modifier: -2
21
- - name: Easter Sunday
22
- regions: [gb]
23
- function: easter(year)
24
- - name: Easter Monday
25
- regions: [gb_eng, gb_wls, gb_eaw, gb_nir]
26
- function: easter(year)
27
- function_modifier: 1
28
- 1:
29
- - name: New Year's Day
30
- regions: [gb]
31
- mday: 1
32
- observed: to_monday_if_weekend(date)
33
- - name: 2nd January
34
- regions: [gb_sct]
35
- mday: 2
36
- observed: to_weekday_if_boxing_weekend(date)
37
- 3:
38
- - name: St. Piran's Day
39
- regions: [gb_con]
40
- mday: 5
41
- - name: St. Patrick's Day
42
- regions: [gb_nir]
43
- mday: 17
44
- 5:
45
- - name: May Day
46
- regions: [gb]
47
- week: 1
48
- wday: 1
49
- - name: Liberation Day
50
- regions: [je, gb_jsy, gg, gb_gsy]
51
- mday: 9
52
- - name: Bank Holiday
53
- regions: [gb]
54
- week: -1
55
- wday: 1
56
- 7:
57
- - name: Tynwald Day
58
- regions: [im, gb_iom]
59
- mday: 5
60
- - name: Battle of the Boyne
61
- regions: [gb_nir]
62
- mday: 12
63
- 8:
64
- - name: Bank Holiday
65
- regions: [gb_sct]
66
- week: 1
67
- wday: 1
68
- - name: Bank Holiday
69
- regions: [gb_eng, gb_wls, gb_eaw, gb_nir]
70
- week: -1
71
- wday: 1
72
- 11:
73
- - name: Guy Fawkes Day
74
- regions: [gb]
75
- mday: 5
76
- type: informal
77
- - name: St. Andrew's Day
78
- regions: [gb_sct]
79
- mday: 30
80
- type: informal
81
- observed: to_monday_if_weekend(date)
82
- year_ranges:
83
- - before: 2006
84
- - name: St. Andrew's Day
85
- regions: [gb_sct]
86
- mday: 30
87
- observed: to_monday_if_weekend(date)
88
- year_ranges:
89
- - after: 2007
90
- 12:
91
- - name: Christmas Day
92
- regions: [gb]
93
- mday: 25
94
- observed: to_monday_if_weekend(date)
95
- - name: Boxing Day
96
- regions: [gb]
97
- mday: 26
98
- observed: to_weekday_if_boxing_weekend(date)
99
- tests: |
100
- {Date.civil(2008,3,21) => 'Good Friday',
101
- Date.civil(2008,3,23) => 'Easter Sunday',
102
- Date.civil(2008,5,5) => 'May Day',
103
- Date.civil(2008,5,26) => 'Bank Holiday',
104
- Date.civil(2008,11,5) => 'Guy Fawkes Day',
105
- Date.civil(2008,12,25) => 'Christmas Day',
106
- Date.civil(2008,12,26) => 'Boxing Day'}.each do |date, name|
107
- assert_equal name, (Holidays.on(date, :gb, :informal)[0] || {})[:name]
108
- end
109
-
110
- assert_equal 'St. Patrick\'s Day', Holidays.on(Date.civil(2008,3,17), :gb_nir, :informal)[0][:name]
111
-
112
- # St. Andrew's Day is informal 2006 and earlier. Should only show up when :informal is passed
113
- assert_equal 'St. Andrew\'s Day', Holidays.on(Date.civil(2006,11,30), :gb_sct, :informal)[0][:name]
114
- assert_equal 'St. Andrew\'s Day', Holidays.on(Date.civil(2006,11,30), :gb_sct, :informal, :observed)[0][:name]
115
- assert_equal 'St. Andrew\'s Day', Holidays.on(Date.civil(2002,12,2), :gb_sct, :informal, :observed)[0][:name]
116
- assert_equal [], Holidays.on(Date.civil(2004,11,30), :gb_sct)
117
- assert_equal [], Holidays.on(Date.civil(2005,11,30), :gb_sct)
118
- assert_equal [], Holidays.on(Date.civil(2006,11,30), :gb_sct)
119
-
120
- # St. Andrew's Day is considered a formal bank holiday 2007 and later. It should show up regardless of whether
121
- # :informal is specified
122
- assert_equal 'St. Andrew\'s Day', Holidays.on(Date.civil(2007,11,30), :gb_sct)[0][:name]
123
- assert_equal 'St. Andrew\'s Day', Holidays.on(Date.civil(2007,11,30), :gb_sct, :informal)[0][:name]
124
- assert_equal 'St. Andrew\'s Day', Holidays.on(Date.civil(2007,11,30), :gb_sct, :informal, :observed)[0][:name]
125
- assert_equal 'St. Andrew\'s Day', Holidays.on(Date.civil(2016,11,30), :gb_sct)[0][:name]
126
- assert_equal 'St. Andrew\'s Day', Holidays.on(Date.civil(2019,11,30), :gb_sct)[0][:name]
127
- assert_equal 'St. Andrew\'s Day', Holidays.on(Date.civil(2019,12,2), :gb_sct, :observed)[0][:name]
128
-
129
- assert_equal 'Christmas Day', Holidays.on(Date.civil(2008,12,25), :gb_, :observed)[0][:name]
130
- assert_equal 'Christmas Day', Holidays.on(Date.civil(2009,12,25), :gb_, :observed)[0][:name]
131
- assert_equal 'Christmas Day', Holidays.on(Date.civil(2010,12,27), :gb_, :observed)[0][:name]
132
-
133
- assert_equal 'Boxing Day', Holidays.on(Date.civil(2008,12,26), :gb_, :observed)[0][:name]
134
- assert_equal 'Boxing Day', Holidays.on(Date.civil(2009,12,28), :gb_, :observed)[0][:name]
135
- assert_equal 'Boxing Day', Holidays.on(Date.civil(2010,12,28), :gb_, :observed)[0][:name]
136
- assert_equal 'Boxing Day', Holidays.on(Date.civil(2011,12,27), :gb_, :observed)[0][:name]
137
-
138
- assert_equal 'New Year\'s Day', Holidays.on(Date.civil(2010,1,1), :gb, :observed)[0][:name]
139
- assert_equal 'New Year\'s Day', Holidays.on(Date.civil(2011,1,3), :gb, :observed)[0][:name]
140
- assert_equal 'New Year\'s Day', Holidays.on(Date.civil(2012,1,2), :gb, :observed)[0][:name]
141
-
142
- assert_equal '2nd January', Holidays.on(Date.civil(2010,1,4), :gb_sct, :observed)[0][:name]
143
- assert_equal '2nd January', Holidays.on(Date.civil(2011,1,4), :gb_sct, :observed)[0][:name]
144
- assert_equal '2nd January', Holidays.on(Date.civil(2012,1,3), :gb_sct, :observed)[0][:name]
145
- assert_equal '2nd January', Holidays.on(Date.civil(2013,1,2), :gb_sct, :observed)[0][:name]
146
- assert_equal '2nd January', Holidays.on(Date.civil(2014,1,2), :gb_sct, :observed)[0][:name]
147
-
148
- [:gb_wls, :gb_eng, :gb_nir, :gb_eaw, :gb_].each do |r|
149
- assert_equal 'Easter Monday', Holidays.on(Date.civil(2008,3,24), r)[0][:name]
150
- assert_equal 'Bank Holiday', Holidays.on(Date.civil(2008,8,25), r)[0][:name]
151
- end
data/definitions/hr.yaml DELETED
@@ -1,79 +0,0 @@
1
- # Croatian holiday definitions for the Ruby Holiday gem.
2
- #
3
- # Updated: 2012-08-29.
4
- # Sources:
5
- # http://en.wikipedia.org/wiki/Public_holidays_in_Croatia
6
- ---
7
- months:
8
- 0:
9
- - name: Uskrs
10
- regions: [hr]
11
- function: easter(year)
12
- - name: Uskrsni ponedjeljak
13
- regions: [hr]
14
- function: easter(year)
15
- function_modifier: 1
16
- - name: Tijelovo
17
- regions: [hr]
18
- function: easter(year)
19
- function_modifier: 60
20
- 1:
21
- - name: Nova godina
22
- regions: [hr]
23
- mday: 1
24
- - name: Sveta tri kralja
25
- regions: [hr]
26
- mday: 6
27
- 5:
28
- - name: Međunarodni praznik rada
29
- regions: [hr]
30
- mday: 1
31
- 6:
32
- - name: Dan antifašističke borbe
33
- regions: [hr]
34
- mday: 22
35
- - name: Dan državnosti
36
- regions: [hr]
37
- mday: 25
38
- 8:
39
- - name: Dan pobjede i domovinske zahvalnosti i dan hrvatskih branitelja
40
- regions: [hr]
41
- mday: 5
42
- - name: Velika Gospa
43
- regions: [hr]
44
- mday: 15
45
- 10:
46
- - name: Dan neovisnosti
47
- regions: [hr]
48
- mday: 8
49
- 11:
50
- - name: Dan svih svetih
51
- regions: [hr]
52
- mday: 1
53
- 12:
54
- - name: Božić
55
- regions: [hr]
56
- mday: 25
57
- - name: Sveti Stjepan
58
- regions: [hr]
59
- mday: 26
60
- tests: |
61
- {Date.civil(2012,1,1) => 'Nova godina',
62
- Date.civil(2012,1,6) => 'Sveta tri kralja',
63
- Date.civil(2012,5,1) => 'Međunarodni praznik rada',
64
- Date.civil(2012,6,22) => 'Dan antifašističke borbe',
65
- Date.civil(2012,6,25) => 'Dan državnosti',
66
- Date.civil(2012,8,5) => 'Dan pobjede i domovinske zahvalnosti i dan hrvatskih branitelja',
67
- Date.civil(2012,8,15) => 'Velika Gospa',
68
- Date.civil(2012,10,8) => 'Dan neovisnosti',
69
- Date.civil(2012,11,1) => 'Dan svih svetih',
70
- Date.civil(2012,12,25) => 'Božić',
71
- Date.civil(2012,12,26) => 'Sveti Stjepan'}.each do |date, name|
72
- assert_equal name, (Holidays.on(date, :hr, :informal)[0] || {})[:name]
73
- end
74
-
75
- # Tijelovo
76
- [Date.civil(2008,5,22), Date.civil(2009,6,11), Date.civil(2010,6,3),
77
- Date.civil(2012,6,7), Date.civil(2013,5,30), Date.civil(2014,6,19)].each do |date|
78
- assert_equal 'Tijelovo', Holidays.on(date, :hr)[0][:name]
79
- end
data/definitions/hu.yaml DELETED
@@ -1,63 +0,0 @@
1
- # Hungarian holiday definitions for the Ruby Holiday gem.
2
- #
3
- # Updated: 2012-03-01 by spap
4
- ---
5
- months:
6
- 0:
7
- - name: Húsvét hétfő
8
- regions: [hu]
9
- function: easter(year)
10
- function_modifier: 1
11
- - name: Pünkösd hétfő
12
- regions: [hu]
13
- function: easter(year)
14
- function_modifier: 50
15
- 1:
16
- - name: Újév
17
- regions: [hu]
18
- mday: 1
19
- 3:
20
- - name: 1848/49-es forradalom és szabadságharc ünnepe
21
- regions: [hu]
22
- mday: 15
23
- 5:
24
- - name: A munka ünnepe
25
- regions: [hu]
26
- mday: 1
27
- 8:
28
- - name: Az államalapítás ünnepe
29
- regions: [hu]
30
- mday: 20
31
- 10:
32
- - name: 1956-os forradalom és szabadságharc ünnepe
33
- regions: [hu]
34
- mday: 23
35
- 11:
36
- - name: Mindenszentek
37
- regions: [hu]
38
- mday: 1
39
- 12:
40
- - name: Karácsony
41
- regions: [hu]
42
- mday: 25
43
- - name: Karácsony
44
- regions: [hu]
45
- mday: 26
46
- tests: |
47
- {Date.civil(2012,1,1) => 'Újév',
48
- Date.civil(2011,1,1) => 'Újév',
49
- Date.civil(2012,3,15) => '1848/49-es forradalom és szabadságharc ünnepe',
50
- Date.civil(2011,4,25) => 'Húsvét hétfő',
51
- Date.civil(2012,4,9) => 'Húsvét hétfő',
52
- Date.civil(2012,5,1) => 'A munka ünnepe',
53
- Date.civil(2011,6,13) => 'Pünkösd hétfő',
54
- Date.civil(2012,5,28) => 'Pünkösd hétfő',
55
- Date.civil(2012,8,20) => 'Az államalapítás ünnepe',
56
- Date.civil(2012,10,23) => '1956-os forradalom és szabadságharc ünnepe',
57
- Date.civil(2012,11,1) => 'Mindenszentek',
58
- Date.civil(2012,12,25) => 'Karácsony',
59
- Date.civil(2012,12,26) => 'Karácsony',}.each do |date, name|
60
- assert_equal name, (Holidays.on(date, :hu, :informal)[0] || {})[:name]
61
- end
62
-
63
- assert_equal [], Holidays.on(Date.civil(2012,3,14), :hu), '2012-03-14 is not a holiday in Hungary'
data/definitions/ie.yaml DELETED
@@ -1,89 +0,0 @@
1
- # Ireland holiday definitions for the Ruby Holiday gem.
2
- #
3
- # Updated: 2012-03-16.
4
- # Sources:
5
- # - http://en.wikipedia.org/wiki/Public_holidays_in_the_Republic_of_Ireland
6
- # - http://www.citizensinformation.ie/categories/employment/employment-rights-and-conditions/leave-and-holidays/public-holidays-in-ireland
7
- # While there is mention that Jan 2 2012 was not officially a bank holiday, in reality very few businesses will not observe that date as a bank holiday
8
- ---
9
- months:
10
- 0:
11
- - name: Easter Monday
12
- regions: [ie]
13
- function: easter(year)
14
- function_modifier: 1
15
- 1:
16
- - name: New Year's Day
17
- regions: [ie]
18
- mday: 1
19
- observed: to_monday_if_weekend(date)
20
- 3:
21
- - name: St. Patrick's Day
22
- regions: [ie]
23
- mday: 17
24
- observed: to_monday_if_weekend(date)
25
- 5:
26
- - name: May Day
27
- regions: [ie]
28
- week: 1
29
- wday: 1
30
- 6:
31
- - name: June Bank Holiday
32
- regions: [ie]
33
- week: 1
34
- wday: 1
35
- 8:
36
- - name: August Bank Holiday
37
- regions: [ie]
38
- week: 1
39
- wday: 1
40
- 10:
41
- - name: October Bank Holiday
42
- regions: [ie]
43
- week: -1
44
- wday: 1
45
- 12:
46
- - name: Christmas Day
47
- regions: [ie]
48
- mday: 25
49
- observed: to_monday_if_weekend(date)
50
- - name: St. Stephen's Day
51
- regions: [ie]
52
- mday: 26
53
- observed: ie_st_stephens_day(date)
54
- methods:
55
- ie_st_stephens_day:
56
- # Ireland - Stephens Day is always the day after christmas day
57
- arguments: date
58
- source: |
59
- case date.wday
60
- when 6, 0 then date + 2
61
- when 1 then date + 1
62
- else date
63
- end
64
- tests: |
65
- {Date.civil(2008,1,1) => 'New Year\'s Day',
66
- Date.civil(2008,3,17) => 'St. Patrick\'s Day',
67
- Date.civil(2008,3,24) => 'Easter Monday',
68
- Date.civil(2008,5,5) => 'May Day',
69
- Date.civil(2008,6,2) => 'June Bank Holiday',
70
- Date.civil(2008,8,4) => 'August Bank Holiday',
71
- Date.civil(2008,10,27) => 'October Bank Holiday',
72
- Date.civil(2008,12,25) => 'Christmas Day',
73
- Date.civil(2008,12,26) => 'St. Stephen\'s Day'}.each do |date, name|
74
- assert_equal name, (Holidays.on(date, :ie)[0] || {})[:name]
75
- end
76
- {Date.civil(2012,1,2) => 'New Year\'s Day',
77
- Date.civil(2012,3,19) => 'St. Patrick\'s Day',
78
- Date.civil(2012,4,9) => 'Easter Monday',
79
- Date.civil(2012,5,7) => 'May Day',
80
- Date.civil(2012,6,4) => 'June Bank Holiday',
81
- Date.civil(2012,8,6) => 'August Bank Holiday',
82
- Date.civil(2012,10,29) => 'October Bank Holiday',
83
- Date.civil(2011,12,26) => 'Christmas Day',
84
- Date.civil(2011,12,27) => 'St. Stephen\'s Day',
85
- Date.civil(2012,12,25) => 'Christmas Day',
86
- Date.civil(2012,12,26) => 'St. Stephen\'s Day',
87
- Date.civil(2015,12,28) => 'St. Stephen\'s Day'}.each do |date, name|
88
- assert_equal name, (Holidays.on(date, :ie, :observed)[0] || {})[:name]
89
- end
@@ -1,57 +0,0 @@
1
- # Definition build list
2
- ---
3
- defs:
4
- AR: ['ar.yaml']
5
- AT: ['at.yaml']
6
- AU: ['au.yaml']
7
- BE_FR: ['be_fr.yaml']
8
- BE_NL: ['be_nl.yaml']
9
- BR: ['br.yaml']
10
- BG: ['bg.yaml']
11
- CA: ['ca.yaml', 'north_america_informal.yaml']
12
- CH: ['ch.yaml']
13
- CL: ['cl.yaml']
14
- CR: ['cr.yaml']
15
- CZ: ['cz.yaml']
16
- DK: ['dk.yaml']
17
- DE: ['de.yaml']
18
- ECB_TARGET: ['ecb_target.yaml']
19
- EL: ['el.yaml']
20
- ES: ['es.yaml']
21
- Federal_Reserve: ['federal_reserve.yaml']
22
- FedEx: ['fedex.yaml']
23
- FI: ['fi.yaml']
24
- FR: ['fr.yaml']
25
- GB: ['gb.yaml']
26
- HR: ['hr.yaml']
27
- HU: ['hu.yaml']
28
- IE: ['ie.yaml']
29
- IS: ['is.yaml']
30
- IT: ['it.yaml']
31
- LI: ['li.yaml']
32
- LT: ['lt.yaml']
33
- MA: ['ma.yaml']
34
- MX: ['mx.yaml', 'north_america_informal.yaml']
35
- NERC: ['nerc.yaml']
36
- NL: ['nl.yaml']
37
- "NO": ['no.yaml']
38
- NYSE: ['nyse.yaml']
39
- NZ: ['nz.yaml']
40
- PH: ['ph.yaml']
41
- PL: ['pl.yaml']
42
- PT: ['pt.yaml']
43
- RO: ['ro.yaml']
44
- SE: ['se.yaml']
45
- US: ['us.yaml', 'north_america_informal.yaml']
46
- United_Nations: ['united_nations.yaml']
47
- UPS: ['ups.yaml']
48
- ZA: ['za.yaml']
49
- North_America: ['ca.yaml', 'mx.yaml', 'us.yaml', 'north_america_informal.yaml']
50
- Scandinavia: ['dk.yaml', 'is.yaml', 'no.yaml', 'se.yaml', 'fi.yaml']
51
- Europe: ['at.yaml', 'be_fr.yaml', 'be_nl.yaml', 'ch.yaml', 'cz.yaml', 'dk.yaml', 'de.yaml', 'el.yaml', 'es.yaml', 'fr.yaml', 'gb.yaml', 'hr.yaml', 'hu.yaml', 'ie.yaml', 'is.yaml', 'it.yaml', 'li.yaml', 'lt.yaml', 'nl.yaml', 'no.yaml', 'pl.yaml', 'pt.yaml', 'ro.yaml', 'sk.yaml', 'si.yaml', 'bg.yaml']
52
- JP: ['jp.yaml']
53
- VE: ['ve.yaml']
54
- VI: ['vi.yaml']
55
- SK: ['sk.yaml']
56
- SI: ['si.yaml']
57
- SG: ['sg.yaml']
data/definitions/is.yaml DELETED
@@ -1,146 +0,0 @@
1
- # Icelandic holiday definitions for the Ruby Holiday gem.
2
- #
3
- # Updated: 2008-11-29.
4
- # Sources:
5
- # - http://www.simnet.is/gardarj/folk/days.htm#days
6
- # - http://www.iceland.is/history-and-culture/Traditions/IcelandicHolidays/
7
- # - http://en.wikipedia.org/wiki/Public_holidays_in_Iceland
8
- # - http://www.qppstudio.net/publicholidays2007/iceland.htm
9
- ---
10
- months:
11
- 0:
12
- - name: Bolludagur
13
- regions: [is]
14
- function: easter(year)
15
- function_modifier: -48
16
- - name: Sprengidagur
17
- regions: [is]
18
- function: easter(year)
19
- function_modifier: -47
20
- - name: Öskudagur
21
- regions: [is]
22
- function: easter(year)
23
- function_modifier: -46
24
- - name: Pálmasunnudagur
25
- regions: [is]
26
- function: easter(year)
27
- function_modifier: -7
28
- - name: Skírdagur
29
- regions: [is]
30
- function: easter(year)
31
- function_modifier: -3
32
- - name: Föstudaginn langi
33
- regions: [is]
34
- function: easter(year)
35
- function_modifier: -2
36
- - name: Páskadagur
37
- regions: [is]
38
- function: easter(year)
39
- - name: Annar í páskum
40
- regions: [is]
41
- function: easter(year)
42
- function_modifier: 1
43
- - name: Uppstigningardagur
44
- regions: [is]
45
- function: easter(year)
46
- function_modifier: 39
47
- - name: Hvítasunnudagur
48
- regions: [is]
49
- function: easter(year)
50
- function_modifier: 49
51
- - name: Annar í hvítasunnu
52
- regions: [is]
53
- function: easter(year)
54
- function_modifier: 50
55
- 1:
56
- - name: Nýársdagur
57
- regions: [is]
58
- mday: 1
59
- - name: Þrettándinn
60
- regions: [is]
61
- mday: 6
62
- - name: Bóndadagur
63
- regions: [is]
64
- mday: 19
65
- type: informal
66
- 2:
67
- - name: Konudagur
68
- regions: [is]
69
- mday: 18
70
- type: informal
71
- 4:
72
- - name: Sumardagurinn fyrsti
73
- regions: [is]
74
- function: is_sumardagurinn_fyrsti(year)
75
- 5:
76
- - name: Verkalýðsdagurinn
77
- regions: [is]
78
- mday: 1
79
- - name: Mæðradagurinn
80
- regions: [is]
81
- mday: 13
82
- 6:
83
- - name: Sjómannadagurinn
84
- regions: [is]
85
- mday: 3
86
- type: informal
87
- - name: Lýðveldisdagurinn
88
- regions: [is]
89
- mday: 17
90
- 8:
91
- - name: Frídagur verslunarmanna
92
- regions: [is]
93
- week: 1
94
- wday: 1
95
- 11:
96
- - name: Dagur íslenskrar tungu
97
- regions: [is]
98
- mday: 16
99
- 12:
100
- - name: Jól
101
- regions: [is]
102
- mday: 24
103
- - name: Jól
104
- regions: [is]
105
- mday: 25
106
- - name: Jól
107
- regions: [is]
108
- mday: 26
109
- - name: Gamlárskvöld
110
- regions: [is]
111
- mday: 31
112
- methods:
113
- is_sumardagurinn_fyrsti:
114
- # Iceland: first day of summer (Thursday after 18 April)
115
- arguments: year
116
- source: |
117
- date = Date.civil(year,4,18)
118
- if date.wday < 4
119
- date += (4 - date.wday)
120
- else date
121
- date += (11 - date.wday)
122
- end
123
- date
124
- tests: |
125
- {Date.civil(2007,1,1) => 'Nýársdagur',
126
- Date.civil(2007,1,6) => 'Þrettándinn',
127
- Date.civil(2007,1,19) => 'Bóndadagur',
128
- Date.civil(2007,2,18) => 'Konudagur',
129
- Date.civil(2007,4,5) => 'Skírdagur',
130
- Date.civil(2007,4,6) => 'Föstudaginn langi',
131
- Date.civil(2007,4,8) => 'Páskadagur',
132
- Date.civil(2007,4,9) => 'Annar í páskum',
133
- Date.civil(2007,4,19) => 'Sumardagurinn fyrsti',
134
- Date.civil(2007,5,1) => 'Verkalýðsdagurinn',
135
- Date.civil(2007,5,17) => 'Uppstigningardagur',
136
- Date.civil(2007,5,27) => 'Hvítasunnudagur',
137
- Date.civil(2007,5,28) => 'Annar í hvítasunnu',
138
- Date.civil(2007,6,3) => 'Sjómannadagurinn',
139
- Date.civil(2007,6,17) => 'Lýðveldisdagurinn',
140
- Date.civil(2007,8,6) => 'Frídagur verslunarmanna',
141
- Date.civil(2007,12,24) => 'Jól',
142
- Date.civil(2007,12,25) => 'Jól',
143
- Date.civil(2007,12,26) => 'Jól',
144
- Date.civil(2007,12,31) => 'Gamlárskvöld'}.each do |date, name|
145
- assert_equal name, (Holidays.on(date, :is, :informal)[0] || {})[:name]
146
- end
data/definitions/it.yaml DELETED
@@ -1,67 +0,0 @@
1
- # Italian holiday definitions for the Ruby Holiday gem.
2
- #
3
- # Updated: 2008-11-23.
4
- # Sources:
5
- # - http://en.wikipedia.org/wiki/Holidays_in_Italy
6
- ---
7
- months:
8
- 0:
9
- - name: Pasqua
10
- regions: [it]
11
- function: easter(year)
12
- - name: Lunedì dell'Angelo
13
- regions: [it]
14
- function: easter(year)
15
- function_modifier: 1
16
- 1:
17
- - name: Capodanno
18
- regions: [it]
19
- mday: 1
20
- - name: Epifania
21
- regions: [it]
22
- mday: 6
23
- 4:
24
- - name: Festa della Liberazione
25
- regions: [it]
26
- mday: 25
27
- 5:
28
- - name: Festa dei Lavoratori
29
- regions: [it]
30
- mday: 1
31
- 6:
32
- - name: Festa della Repubblica
33
- regions: [it]
34
- mday: 2
35
- 8:
36
- - name: Assunzione
37
- regions: [it]
38
- mday: 15
39
- 11:
40
- - name: Ognissanti
41
- regions: [it]
42
- mday: 1
43
- 12:
44
- - name: Immacolata Concezione
45
- regions: [it]
46
- mday: 8
47
- - name: Natale
48
- regions: [it]
49
- mday: 25
50
- - name: Santo Stefano
51
- regions: [it]
52
- mday: 26
53
- tests: |
54
- {Date.civil(2007,1,1) => 'Capodanno',
55
- Date.civil(2007,1,6) => 'Epifania',
56
- Date.civil(2007,4,8) => 'Pasqua',
57
- Date.civil(2007,4,9) => 'Lunedì dell\'Angelo',
58
- Date.civil(2007,4,25) => 'Festa della Liberazione',
59
- Date.civil(2007,5,1) => 'Festa dei Lavoratori',
60
- Date.civil(2007,6,2) => 'Festa della Repubblica',
61
- Date.civil(2007,8,15) => 'Assunzione',
62
- Date.civil(2007,11,1) => 'Ognissanti',
63
- Date.civil(2007,12,8) => 'Immacolata Concezione',
64
- Date.civil(2007,12,25) => 'Natale',
65
- Date.civil(2007,12,26) => 'Santo Stefano'}.each do |date, name|
66
- assert_equal name, (Holidays.on(date, :it, :informal)[0] || {})[:name]
67
- end