holidays 6.6.1 → 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/lib/generated_definitions/MANIFEST +7 -5
  4. data/lib/generated_definitions/REGIONS.rb +2 -2
  5. data/lib/generated_definitions/ar.rb +2 -2
  6. data/lib/generated_definitions/at.rb +2 -2
  7. data/lib/generated_definitions/au.rb +2 -2
  8. data/lib/generated_definitions/be_fr.rb +2 -2
  9. data/lib/generated_definitions/be_nl.rb +2 -2
  10. data/lib/generated_definitions/bg.rb +2 -2
  11. data/lib/generated_definitions/br.rb +2 -2
  12. data/lib/generated_definitions/ca.rb +5 -4
  13. data/lib/generated_definitions/ch.rb +2 -2
  14. data/lib/generated_definitions/cl.rb +2 -2
  15. data/lib/generated_definitions/co.rb +2 -2
  16. data/lib/generated_definitions/cr.rb +2 -2
  17. data/lib/generated_definitions/cz.rb +2 -2
  18. data/lib/generated_definitions/de.rb +2 -2
  19. data/lib/generated_definitions/dk.rb +2 -2
  20. data/lib/generated_definitions/{ecb_target.rb → ecbtarget.rb} +10 -10
  21. data/lib/generated_definitions/ee.rb +2 -2
  22. data/lib/generated_definitions/el.rb +2 -2
  23. data/lib/generated_definitions/es.rb +2 -2
  24. data/lib/generated_definitions/europe.rb +26 -13
  25. data/lib/generated_definitions/{federal_reserve.rb → federalreserve.rb} +14 -14
  26. data/lib/generated_definitions/federalreservebanks.rb +34 -0
  27. data/lib/generated_definitions/fedex.rb +2 -2
  28. data/lib/generated_definitions/fi.rb +2 -2
  29. data/lib/generated_definitions/fr.rb +2 -2
  30. data/lib/generated_definitions/gb.rb +2 -2
  31. data/lib/generated_definitions/ge.rb +2 -2
  32. data/lib/generated_definitions/hk.rb +2 -2
  33. data/lib/generated_definitions/hr.rb +2 -2
  34. data/lib/generated_definitions/hu.rb +2 -2
  35. data/lib/generated_definitions/ie.rb +2 -2
  36. data/lib/generated_definitions/is.rb +2 -2
  37. data/lib/generated_definitions/it.rb +2 -2
  38. data/lib/generated_definitions/jp.rb +12 -6
  39. data/lib/generated_definitions/kr.rb +2 -2
  40. data/lib/generated_definitions/li.rb +2 -2
  41. data/lib/generated_definitions/lt.rb +2 -2
  42. data/lib/generated_definitions/lu.rb +2 -2
  43. data/lib/generated_definitions/ma.rb +2 -2
  44. data/lib/generated_definitions/mt_en.rb +2 -2
  45. data/lib/generated_definitions/mt_mt.rb +2 -2
  46. data/lib/generated_definitions/mx.rb +3 -3
  47. data/lib/generated_definitions/my.rb +2 -2
  48. data/lib/generated_definitions/nerc.rb +2 -2
  49. data/lib/generated_definitions/nl.rb +2 -2
  50. data/lib/generated_definitions/no.rb +2 -2
  51. data/lib/generated_definitions/{north_america.rb → northamerica.rb} +6 -5
  52. data/lib/generated_definitions/nyse.rb +2 -2
  53. data/lib/generated_definitions/nz.rb +2 -2
  54. data/lib/generated_definitions/pe.rb +2 -2
  55. data/lib/generated_definitions/ph.rb +2 -2
  56. data/lib/generated_definitions/pl.rb +2 -2
  57. data/lib/generated_definitions/pt.rb +2 -2
  58. data/lib/generated_definitions/ro.rb +2 -2
  59. data/lib/generated_definitions/rs_cyrl.rb +2 -2
  60. data/lib/generated_definitions/rs_la.rb +2 -2
  61. data/lib/generated_definitions/ru.rb +2 -2
  62. data/lib/generated_definitions/scandinavia.rb +2 -2
  63. data/lib/generated_definitions/se.rb +2 -2
  64. data/lib/generated_definitions/sg.rb +2 -2
  65. data/lib/generated_definitions/si.rb +2 -2
  66. data/lib/generated_definitions/sk.rb +2 -2
  67. data/lib/generated_definitions/{south_america.rb → southamerica.rb} +3 -3
  68. data/lib/generated_definitions/tn.rb +2 -2
  69. data/lib/generated_definitions/tr.rb +2 -2
  70. data/lib/generated_definitions/ua.rb +37 -0
  71. data/lib/generated_definitions/{united_nations.rb → unitednations.rb} +61 -61
  72. data/lib/generated_definitions/ups.rb +2 -2
  73. data/lib/generated_definitions/us.rb +3 -3
  74. data/lib/generated_definitions/ve.rb +2 -2
  75. data/lib/generated_definitions/vi.rb +2 -2
  76. data/lib/generated_definitions/za.rb +2 -2
  77. data/lib/holidays/definition/context/generator.rb +3 -36
  78. data/lib/holidays/definition/generator/module.rb +54 -0
  79. data/lib/holidays/definition/generator/regions.rb +1 -1
  80. data/lib/holidays/factory/definition.rb +7 -0
  81. data/lib/holidays/version.rb +1 -1
  82. data/test/defs/test_defs_ca.rb +18 -2
  83. data/test/defs/{test_defs_ecb_target.rb → test_defs_ecbtarget.rb} +11 -11
  84. data/test/defs/test_defs_europe.rb +31 -1
  85. data/test/defs/{test_defs_federal_reserve.rb → test_defs_federalreserve.rb} +54 -54
  86. data/test/defs/test_defs_federalreservebanks.rb +113 -0
  87. data/test/defs/test_defs_jp.rb +19 -1
  88. data/test/defs/test_defs_mx.rb +1 -1
  89. data/test/defs/{test_defs_north_america.rb → test_defs_northamerica.rb} +20 -4
  90. data/test/defs/{test_defs_south_america.rb → test_defs_southamerica.rb} +2 -2
  91. data/test/defs/test_defs_ua.rb +41 -0
  92. data/test/defs/{test_defs_united_nations.rb → test_defs_unitednations.rb} +3 -3
  93. data/test/defs/test_defs_us.rb +1 -1
  94. data/test/holidays/definition/context/test_generator.rb +13 -3
  95. data/test/holidays/definition/generator/test_module.rb +268 -0
  96. data/test/integration/test_available_regions.rb +1 -1
  97. data/test/integration/test_holidays.rb +1 -7
  98. data/test/integration/test_holidays_between.rb +1 -1
  99. data/test/integration/test_nonstandard_regions.rb +25 -0
  100. metadata +28 -17
@@ -12,7 +12,7 @@ module Holidays
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Jueves Santo", :regions => [:es_pv, :es_na, :es_an, :es_ib, :es_cm, :es_mu, :es_m, :es_ar, :es_cl, :es_cn, :es_lo, :es_ga, :es_ce, :es_o, :es_ex]},
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Jueves Santo", :regions => [:es_pv, :es_na, :es_an, :es_ib, :es_cm, :es_mu, :es_m, :es_ar, :es_cl, :es_cn, :es_lo, :es_ga, :es_ce, :es_o, :es_ex]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:es]},
17
17
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Lunes de Pascua", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]}],
18
18
  1 => [{:mday => 1, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Año Nuevo", :regions => [:es]},
@@ -47,7 +47,7 @@ module Holidays
47
47
 
48
48
  def self.custom_methods
49
49
  {
50
-
50
+
51
51
  }
52
52
  end
53
53
  end
@@ -2,17 +2,17 @@
2
2
  module Holidays
3
3
  # This file is generated by the Ruby Holidays gem.
4
4
  #
5
- # 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
5
+ # 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
6
  #
7
7
  # All the definitions are available at https://github.com/holidays/holidays
8
8
  module EUROPE # :nodoc:
9
9
  def self.defined_regions
10
- [:at, :be_fr, :be_nl, :ch_zh, :ch_be, :ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_bs, :ch_bl, :ch_sh, :ch_ar, :ch_ai, :ch_sg, :ch_gr, :ch_ag, :ch_tg, :ch_ti, :ch_vd, :ch_ne, :ch_ge, :ch_ju, :ch_vs, :ch, :cz, :dk, :de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :de_th_cath, :de_sn, :de_st, :de_by_cath, :de_by_augsburg, :de_bb, :de_mv, :de_th, :de_hb, :de_hh, :de_ni, :de_sh, :el, :es_pv, :es_na, :es_an, :es_ib, :es_cm, :es_mu, :es_m, :es_ar, :es_cl, :es_cn, :es_lo, :es_ga, :es_ce, :es_o, :es_ex, :es, :es_ct, :es_v, :es_vc, :fr_a, :fr_m, :fr, :gb, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :je, :gb_jsy, :gg, :gb_gsy, :gb_sct, :gb_con, :im, :gb_iom, :hr, :hu, :ie, :is, :it, :li, :lt, :nl, :no, :pl, :pt, :pt_li, :pt_po, :ro, :sk, :si, :bg_en, :bg_bg]
10
+ [:at, :be_fr, :be_nl, :ch_zh, :ch_be, :ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_bs, :ch_bl, :ch_sh, :ch_ar, :ch_ai, :ch_sg, :ch_gr, :ch_ag, :ch_tg, :ch_ti, :ch_vd, :ch_ne, :ch_ge, :ch_ju, :ch_vs, :ch, :cz, :dk, :de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :de_th_cath, :de_sn, :de_st, :de_by_cath, :de_by_augsburg, :de_bb, :de_mv, :de_th, :de_hb, :de_hh, :de_ni, :de_sh, :el, :es_pv, :es_na, :es_an, :es_ib, :es_cm, :es_mu, :es_m, :es_ar, :es_cl, :es_cn, :es_lo, :es_ga, :es_ce, :es_o, :es_ex, :es, :es_ct, :es_v, :es_vc, :fr_a, :fr_m, :fr, :gb, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :je, :gb_jsy, :gg, :gb_gsy, :gb_sct, :gb_con, :im, :gb_iom, :hr, :hu, :ie, :is, :it, :li, :lt, :nl, :no, :pl, :pt, :pt_li, :pt_po, :ro, :sk, :si, :bg_en, :bg_bg, :ua]
11
11
  end
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Ostermontag", :regions => [:at]},
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Ostermontag", :regions => [:at]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Christi Himmelfahrt", :regions => [:at]},
17
17
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "Pfingstmontag", :regions => [:at]},
18
18
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 60, :name => "Fronleichnam", :regions => [:at]},
@@ -146,7 +146,9 @@ module Holidays
146
146
  {:function => "orthodox_easter_julian(year)", :function_arguments => [:year], :function_modifier => -1, :name => "Велика събота", :regions => [:bg_bg]},
147
147
  {:function => "orthodox_easter_julian(year)", :function_arguments => [:year], :name => "Easter Sunday", :regions => [:bg_en]},
148
148
  {:function => "orthodox_easter_julian(year)", :function_arguments => [:year], :name => "Възкресение Христово. Великден", :regions => [:bg_bg, :bg_bg]},
149
- {:function => "orthodox_easter_julian(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:bg_en]}],
149
+ {:function => "orthodox_easter_julian(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:bg_en]},
150
+ {:function => "orthodox_easter(year)", :function_arguments => [:year], :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Великдень", :regions => [:ua]},
151
+ {:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => 49, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Трійця", :regions => [:ua]}],
150
152
  1 => [{:mday => 1, :name => "Neujahrstag", :regions => [:at]},
151
153
  {:mday => 6, :name => "Heilige Drei Könige", :regions => [:at]},
152
154
  {:mday => 1, :name => "Jour de l'an", :regions => [:be_fr]},
@@ -191,7 +193,9 @@ module Holidays
191
193
  {:mday => 6, :name => "Zjavenie Pána (Traja králi)", :regions => [:sk]},
192
194
  {:mday => 1, :name => "novo leto", :regions => [:si]},
193
195
  {:mday => 1, :name => "New Year's Day", :regions => [:bg_en]},
194
- {:mday => 1, :name => "Нова година", :regions => [:bg_bg]}],
196
+ {:mday => 1, :name => "Нова година", :regions => [:bg_bg]},
197
+ {:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Новий Рік", :regions => [:ua]},
198
+ {:mday => 7, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Різдво Христове", :regions => [:ua]}],
195
199
  5 => [{:mday => 1, :name => "Staatsfeiertag", :regions => [:at]},
196
200
  {:mday => 1, :name => "Fête du travail", :regions => [:be_fr]},
197
201
  {:mday => 1, :name => "Feest van de Arbeid", :regions => [:be_nl]},
@@ -237,7 +241,10 @@ module Holidays
237
241
  {:mday => 6, :name => "St. George's Day", :regions => [:bg_en]},
238
242
  {:mday => 6, :name => "Гергьовден. Ден на храбростта", :regions => [:bg_bg]},
239
243
  {:mday => 24, :name => "Slavic Literacy Day", :regions => [:bg_en]},
240
- {:mday => 24, :name => "Ден на славянската писменост", :regions => [:bg_bg]}],
244
+ {:mday => 24, :name => "Ден на славянската писменост", :regions => [:bg_bg]},
245
+ {:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "День праці", :regions => [:ua]},
246
+ {:mday => 2, :year_ranges => [{:before => 2017}],:name => "День міжнародної солідарності трудящих", :regions => [:ua]},
247
+ {:mday => 9, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "День перемоги над нацизмом у Другій світовій війні", :regions => [:ua]}],
241
248
  8 => [{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:at]},
242
249
  {:mday => 15, :name => "Assomption", :regions => [:be_fr]},
243
250
  {:mday => 15, :name => "O.L.V. Hemelvaart", :regions => [:be_nl]},
@@ -263,7 +270,8 @@ module Holidays
263
270
  {:mday => 15, :name => "Assunção de Nossa Senhora", :regions => [:pt]},
264
271
  {:mday => 15, :name => "Adormirea Maicii Domnului", :regions => [:ro]},
265
272
  {:mday => 29, :name => "Výročie Slovenského národného povstania", :regions => [:sk]},
266
- {:mday => 15, :name => "Marijino vnebovzetje", :regions => [:si]}],
273
+ {:mday => 15, :name => "Marijino vnebovzetje", :regions => [:si]},
274
+ {:mday => 24, :year_ranges => [{:after => 1992}],:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "День Незалежності", :regions => [:ua]}],
267
275
  10 => [{:mday => 26, :name => "Nationalfeiertag", :regions => [:at]},
268
276
  {:mday => 28, :name => "Den vzniku samostatného československého státu", :regions => [:cz]},
269
277
  {:mday => 3, :name => "Tag der Deutschen Einheit", :regions => [:de]},
@@ -279,7 +287,8 @@ module Holidays
279
287
  {:wday => 1, :week => -1, :name => "October Bank Holiday", :regions => [:ie]},
280
288
  {:mday => 14, :type => :informal, :name => "Dzień Nauczyciela (Dzień Edukacji Narodowej)", :regions => [:pl]},
281
289
  {:mday => 5, :name => "Dia da República", :regions => [:pt]},
282
- {:mday => 31, :name => "dan reformacije", :regions => [:si]}],
290
+ {:mday => 31, :name => "dan reformacije", :regions => [:si]},
291
+ {:mday => 14, :year_ranges => [{:after => 2015}],:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "День захисника України", :regions => [:ua]}],
283
292
  11 => [{:mday => 1, :name => "Allerheiligen", :regions => [:at]},
284
293
  {:mday => 1, :name => "Toussaint", :regions => [:be_fr]},
285
294
  {:mday => 11, :name => "Armistice 1918", :regions => [:be_fr]},
@@ -393,7 +402,8 @@ module Holidays
393
402
  {:mday => 25, :name => "Christmas", :regions => [:bg_en]},
394
403
  {:mday => 25, :name => "Рождество Христово. Коледа", :regions => [:bg_bg]},
395
404
  {:mday => 26, :name => "Christmas", :regions => [:bg_en]},
396
- {:mday => 26, :name => "Рождество Христово. Коледа", :regions => [:bg_bg]}],
405
+ {:mday => 26, :name => "Рождество Христово. Коледа", :regions => [:bg_bg]},
406
+ {:mday => 25, :year_ranges => [{:after => 2017}],:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Різдво Христове", :regions => [:ua]}],
397
407
  7 => [{:mday => 21, :name => "Fête nationale", :regions => [:be_fr]},
398
408
  {:mday => 21, :name => "Nationale Feestdag", :regions => [:be_nl]},
399
409
  {:mday => 5, :name => "Den slovanských věrozvěstů Cyrila a Metoděje", :regions => [:cz]},
@@ -403,7 +413,8 @@ module Holidays
403
413
  {:mday => 5, :name => "Tynwald Day", :regions => [:im, :gb_iom]},
404
414
  {:mday => 12, :name => "Battle of the Boyne", :regions => [:gb_nir]},
405
415
  {:mday => 6, :name => "Valstybės diena", :regions => [:lt]},
406
- {:mday => 5, :name => "Sviatok svätého Cyrila a svätého Metoda", :regions => [:sk]}],
416
+ {:mday => 5, :name => "Sviatok svätého Cyrila a svätého Metoda", :regions => [:sk]},
417
+ {:mday => 16, :year_ranges => [{:limited => [1991]}],:name => "День Незалежності України", :regions => [:ua]}],
407
418
  3 => [{:mday => 1, :name => "Instauration de la République", :regions => [:ch_ne]},
408
419
  {:mday => 19, :name => "Josephstag", :regions => [:ch_ur, :ch_sz, :ch_nw, :ch_ti, :ch_vs]},
409
420
  {:mday => 25, :name => "Επέτειος της Επανάστασης του 1821", :regions => [:el]},
@@ -418,7 +429,8 @@ module Holidays
418
429
  {:mday => 8, :type => :informal, :name => "Dzień Kobiet", :regions => [:pl]},
419
430
  {:mday => 10, :type => :informal, :name => "Dzień Mężczyzn", :regions => [:pl]},
420
431
  {:mday => 3, :name => "Liberation Day", :regions => [:bg_en]},
421
- {:mday => 3, :name => "Освобожението на България", :regions => [:bg_bg]}],
432
+ {:mday => 3, :name => "Освобожението на България", :regions => [:bg_bg]},
433
+ {:mday => 8, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Міжнародний жіночий день", :regions => [:ua]}],
422
434
  4 => [{:function => "ch_gl_naefelser_fahrt(year)", :function_arguments => [:year], :name => "Näfelser Fahrt", :regions => [:ch_gl]},
423
435
  {:mday => 1, :type => :informal, :name => "1. april", :regions => [:dk]},
424
436
  {:mday => 9, :type => :informal, :name => "Danmarks besættelse", :regions => [:dk]},
@@ -450,7 +462,8 @@ module Holidays
450
462
  {:mday => 10, :name => "Dia de Portugal", :regions => [:pt]},
451
463
  {:mday => 13, :name => "Dia de Santo António", :regions => [:pt_li]},
452
464
  {:mday => 24, :name => "Dia de São João", :regions => [:pt_po]},
453
- {:mday => 25, :name => "dan državnosti", :regions => [:si]}],
465
+ {:mday => 25, :name => "dan državnosti", :regions => [:si]},
466
+ {:mday => 28, :year_ranges => [{:after => 1997}],:observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "День Конституції", :regions => [:ua]}],
454
467
  9 => [{:mday => 22, :name => "Mauritiustag", :regions => [:ch_ai]},
455
468
  {:mday => 25, :name => "Bruderklausenfest", :regions => [:ch_ow]},
456
469
  {:mday => 28, :name => "Den české státnosti", :regions => [:cz]},
@@ -479,7 +492,7 @@ module Holidays
479
492
 
480
493
  def self.custom_methods
481
494
  {
482
- "ch_vd_lundi_du_jeune_federal(year)" => Proc.new { |year|
495
+ "ch_vd_lundi_du_jeune_federal(year)" => Proc.new { |year|
483
496
  date = Date.civil(year,9,1)
484
497
  # Find the first Sunday of September
485
498
  until date.wday.eql? 0 do
@@ -2,32 +2,32 @@
2
2
  module Holidays
3
3
  # This file is generated by the Ruby Holidays gem.
4
4
  #
5
- # Definitions loaded: definitions/federal_reserve.yaml
5
+ # Definitions loaded: definitions/federalreserve.yaml
6
6
  #
7
7
  # All the definitions are available at https://github.com/holidays/holidays
8
- module FEDERAL_RESERVE # :nodoc:
8
+ module FEDERALRESERVE # :nodoc:
9
9
  def self.defined_regions
10
- [:federal_reserve]
10
+ [:federalreserve]
11
11
  end
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 1 => [{:mday => 1, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:federal_reserve]},
16
- {:wday => 1, :week => 3, :name => "Birthday of Martin Luther King, Jr", :regions => [:federal_reserve]}],
17
- 2 => [{:wday => 1, :week => 3, :name => "Washington's Birthday", :regions => [:federal_reserve]}],
18
- 5 => [{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:federal_reserve]}],
19
- 7 => [{:mday => 4, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Independence Day", :regions => [:federal_reserve]}],
20
- 9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:federal_reserve]}],
21
- 10 => [{:wday => 1, :week => 2, :name => "Columbus Day", :regions => [:federal_reserve]}],
22
- 11 => [{:mday => 11, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Veterans Day", :regions => [:federal_reserve]},
23
- {:wday => 4, :week => 4, :name => "Thanksgiving Day", :regions => [:federal_reserve]}],
24
- 12 => [{:mday => 25, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:federal_reserve]}]
15
+ 1 => [{:mday => 1, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:federalreserve]},
16
+ {:wday => 1, :week => 3, :name => "Birthday of Martin Luther King, Jr", :regions => [:federalreserve]}],
17
+ 2 => [{:wday => 1, :week => 3, :name => "Washington's Birthday", :regions => [:federalreserve]}],
18
+ 5 => [{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:federalreserve]}],
19
+ 7 => [{:mday => 4, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Independence Day", :regions => [:federalreserve]}],
20
+ 9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:federalreserve]}],
21
+ 10 => [{:wday => 1, :week => 2, :name => "Columbus Day", :regions => [:federalreserve]}],
22
+ 11 => [{:mday => 11, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Veterans Day", :regions => [:federalreserve]},
23
+ {:wday => 4, :week => 4, :name => "Thanksgiving Day", :regions => [:federalreserve]}],
24
+ 12 => [{:mday => 25, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:federalreserve]}]
25
25
  }
26
26
  end
27
27
 
28
28
  def self.custom_methods
29
29
  {
30
-
30
+
31
31
  }
32
32
  end
33
33
  end
@@ -0,0 +1,34 @@
1
+ # encoding: utf-8
2
+ module Holidays
3
+ # This file is generated by the Ruby Holidays gem.
4
+ #
5
+ # Definitions loaded: definitions/federalreservebanks.yaml
6
+ #
7
+ # All the definitions are available at https://github.com/holidays/holidays
8
+ module FEDERALRESERVEBANKS # :nodoc:
9
+ def self.defined_regions
10
+ [:federalreservebanks]
11
+ end
12
+
13
+ def self.holidays_by_month
14
+ {
15
+ 1 => [{:mday => 1, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:federalreservebanks]},
16
+ {:wday => 1, :week => 3, :name => "Birthday of Martin Luther King, Jr", :regions => [:federalreservebanks]}],
17
+ 2 => [{:wday => 1, :week => 3, :name => "Washington's Birthday", :regions => [:federalreservebanks]}],
18
+ 5 => [{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:federalreservebanks]}],
19
+ 7 => [{:mday => 4, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Independence Day", :regions => [:federalreservebanks]}],
20
+ 9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:federalreservebanks]}],
21
+ 10 => [{:wday => 1, :week => 2, :name => "Columbus Day", :regions => [:federalreservebanks]}],
22
+ 11 => [{:mday => 11, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Veterans Day", :regions => [:federalreservebanks]},
23
+ {:wday => 4, :week => 4, :name => "Thanksgiving Day", :regions => [:federalreservebanks]}],
24
+ 12 => [{:mday => 25, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Christmas Day", :regions => [:federalreservebanks]}]
25
+ }
26
+ end
27
+
28
+ def self.custom_methods
29
+ {
30
+
31
+ }
32
+ end
33
+ end
34
+ end
@@ -12,7 +12,7 @@ module Holidays
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 1 => [{:mday => 1, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:fedex]}],
15
+ 1 => [{:mday => 1, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:fedex]}],
16
16
  5 => [{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:fedex]}],
17
17
  7 => [{:mday => 4, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Independence Day", :regions => [:fedex]}],
18
18
  9 => [{:wday => 1, :week => 1, :name => "Labor Day", :regions => [:fedex]}],
@@ -25,7 +25,7 @@ module Holidays
25
25
 
26
26
  def self.custom_methods
27
27
  {
28
- "day_after_thanksgiving(year)" => Proc.new { |year|
28
+ "day_after_thanksgiving(year)" => Proc.new { |year|
29
29
  Holidays::Factory::DateCalculator.day_of_month_calculator.call(year, 11, 4, 4) + 1
30
30
  },
31
31
 
@@ -12,7 +12,7 @@ module Holidays
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Pitkäperjantai", :regions => [:fi]},
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Pitkäperjantai", :regions => [:fi]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :name => "Pääsiäispäivä", :regions => [:fi]},
17
17
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "2. Pääsiäispäivä", :regions => [:fi]},
18
18
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Helatorstai", :regions => [:fi]},
@@ -32,7 +32,7 @@ module Holidays
32
32
 
33
33
  def self.custom_methods
34
34
  {
35
- "fi_juhannusaatto(year)" => Proc.new { |year|
35
+ "fi_juhannusaatto(year)" => Proc.new { |year|
36
36
  date = Date.civil(year,6,19)
37
37
  if date.wday > 5 #if 19.6 is saturday
38
38
  date += 6
@@ -12,7 +12,7 @@ module Holidays
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Vendredi saint", :regions => [:fr_a, :fr_m]},
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Vendredi saint", :regions => [:fr_a, :fr_m]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :type => :informal, :name => "Pâques", :regions => [:fr]},
17
17
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Lundi de Pâques", :regions => [:fr]},
18
18
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Ascension", :regions => [:fr]},
@@ -32,7 +32,7 @@ module Holidays
32
32
 
33
33
  def self.custom_methods
34
34
  {
35
-
35
+
36
36
  }
37
37
  end
38
38
  end
@@ -12,7 +12,7 @@ module Holidays
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:gb]},
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:gb]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :name => "Easter Sunday", :regions => [:gb]},
17
17
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir, :je, :gb_jsy, :gg, :gb_gsy]}],
18
18
  1 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:gb]},
@@ -36,7 +36,7 @@ module Holidays
36
36
 
37
37
  def self.custom_methods
38
38
  {
39
-
39
+
40
40
  }
41
41
  end
42
42
  end
@@ -12,7 +12,7 @@ module Holidays
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 0 => [{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "დიდი პარასკევი", :regions => [:ge]},
15
+ 0 => [{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "დიდი პარასკევი", :regions => [:ge]},
16
16
  {:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => -1, :name => "დიდი შაბათი", :regions => [:ge]},
17
17
  {:function => "orthodox_easter(year)", :function_arguments => [:year], :name => "ბრწყინვალე აღდგომის დღე", :regions => [:ge]},
18
18
  {:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "მიცვალებულთა", :regions => [:ge]}],
@@ -34,7 +34,7 @@ module Holidays
34
34
 
35
35
  def self.custom_methods
36
36
  {
37
-
37
+
38
38
  }
39
39
  end
40
40
  end
@@ -12,7 +12,7 @@ module Holidays
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 0 => [{:function => "cn_new_lunar_day(year)", :function_arguments => [:year], :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Lunar New Year's Day", :regions => [:hk]},
15
+ 0 => [{:function => "cn_new_lunar_day(year)", :function_arguments => [:year], :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Lunar New Year's Day", :regions => [:hk]},
16
16
  {:function => "cn_new_lunar_day(year)", :function_arguments => [:year], :function_modifier => 1, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "The second day of Lunar New Year", :regions => [:hk]},
17
17
  {:function => "cn_new_lunar_day(year)", :function_arguments => [:year], :function_modifier => 2, :observed => "to_weekday_if_boxing_weekend(date)", :observed_arguments => [:date], :name => "The third day of Lunar New Year", :regions => [:hk]},
18
18
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:hk]},
@@ -29,7 +29,7 @@ module Holidays
29
29
 
30
30
  def self.custom_methods
31
31
  {
32
- "cn_new_lunar_day(year)" => Proc.new { |year|
32
+ "cn_new_lunar_day(year)" => Proc.new { |year|
33
33
  month_day = case year
34
34
  when 1930, 1949, 1987, 2025, 2063, 2082, 2101, 2112, 2131, 2150, 2207, 2245, 2253, 2283, 2321
35
35
  [1, 29]
@@ -12,7 +12,7 @@ module Holidays
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 0 => [{:function => "easter(year)", :function_arguments => [:year], :name => "Uskrs", :regions => [:hr]},
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :name => "Uskrs", :regions => [:hr]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Uskrsni ponedjeljak", :regions => [:hr]},
17
17
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 60, :name => "Tijelovo", :regions => [:hr]}],
18
18
  1 => [{:mday => 1, :name => "Nova godina", :regions => [:hr]},
@@ -31,7 +31,7 @@ module Holidays
31
31
 
32
32
  def self.custom_methods
33
33
  {
34
-
34
+
35
35
  }
36
36
  end
37
37
  end
@@ -12,7 +12,7 @@ module Holidays
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Húsvét hétfő", :regions => [:hu]},
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Húsvét hétfő", :regions => [:hu]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "Pünkösd hétfő", :regions => [:hu]}],
17
17
  1 => [{:mday => 1, :name => "Újév", :regions => [:hu]}],
18
18
  3 => [{:mday => 15, :name => "1848/49-es forradalom és szabadságharc ünnepe", :regions => [:hu]}],
@@ -27,7 +27,7 @@ module Holidays
27
27
 
28
28
  def self.custom_methods
29
29
  {
30
-
30
+
31
31
  }
32
32
  end
33
33
  end
@@ -12,7 +12,7 @@ module Holidays
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:ie]}],
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:ie]}],
16
16
  1 => [{:mday => 1, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "New Year's Day", :regions => [:ie]}],
17
17
  3 => [{:mday => 17, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "St. Patrick's Day", :regions => [:ie]}],
18
18
  5 => [{:wday => 1, :week => 1, :name => "May Day", :regions => [:ie]}],
@@ -26,7 +26,7 @@ module Holidays
26
26
 
27
27
  def self.custom_methods
28
28
  {
29
-
29
+
30
30
  }
31
31
  end
32
32
  end
@@ -12,7 +12,7 @@ module Holidays
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -48, :name => "Bolludagur", :regions => [:is]},
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -48, :name => "Bolludagur", :regions => [:is]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -47, :name => "Sprengidagur", :regions => [:is]},
17
17
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -46, :name => "Öskudagur", :regions => [:is]},
18
18
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -7, :name => "Pálmasunnudagur", :regions => [:is]},
@@ -43,7 +43,7 @@ module Holidays
43
43
 
44
44
  def self.custom_methods
45
45
  {
46
- "is_sumardagurinn_fyrsti(year)" => Proc.new { |year|
46
+ "is_sumardagurinn_fyrsti(year)" => Proc.new { |year|
47
47
  date = Date.civil(year,4,18)
48
48
  if date.wday < 4
49
49
  date += (4 - date.wday)
@@ -12,7 +12,7 @@ module Holidays
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 0 => [{:function => "easter(year)", :function_arguments => [:year], :name => "Pasqua", :regions => [:it]},
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :name => "Pasqua", :regions => [:it]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Lunedì dell'Angelo", :regions => [:it]}],
17
17
  1 => [{:mday => 1, :name => "Capodanno", :regions => [:it]},
18
18
  {:mday => 6, :name => "Epifania", :regions => [:it]}],
@@ -29,7 +29,7 @@ module Holidays
29
29
 
30
30
  def self.custom_methods
31
31
  {
32
-
32
+
33
33
  }
34
34
  end
35
35
  end
@@ -12,7 +12,7 @@ module Holidays
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 1 => [{:mday => 1, :name => "元日", :regions => [:jp]},
15
+ 1 => [{:mday => 1, :name => "元日", :regions => [:jp]},
16
16
  {:wday => 1, :week => 2, :name => "成人の日", :regions => [:jp]},
17
17
  {:mday => 1, :function => "jp_substitute_holiday(year, month, day)", :function_arguments => [:year, :month, :day], :name => "振替休日", :regions => [:jp]}],
18
18
  2 => [{:mday => 11, :name => "建国記念の日", :regions => [:jp]},
@@ -30,16 +30,22 @@ module Holidays
30
30
  {:mday => 4, :function => "jp_substitute_holiday(year, month, day)", :function_arguments => [:year, :month, :day], :name => "振替休日", :regions => [:jp]},
31
31
  {:mday => 5, :function => "jp_substitute_holiday(year, month, day)", :function_arguments => [:year, :month, :day], :name => "振替休日", :regions => [:jp]}],
32
32
  7 => [{:mday => 20, :year_ranges => [{:between => 1996..2002}],:name => "海の日", :regions => [:jp]},
33
- {:wday => 1, :week => 3, :year_ranges => [{:after => 2003}],:name => "海の日", :regions => [:jp]},
34
- {:function => "jp_marine_day_substitute(year)", :function_arguments => [:year], :year_ranges => [{:between => 1996..2002}],:name => "振替休日", :regions => [:jp]}],
35
- 8 => [{:function => "jp_mountain_holiday(year)", :function_arguments => [:year], :year_ranges => [{:after => 2016}],:name => "山の日", :regions => [:jp]},
33
+ {:wday => 1, :week => 3, :year_ranges => [{:between => 2003..2019}],:name => "海の日", :regions => [:jp]},
34
+ {:mday => 23, :year_ranges => [{:limited => [2020]}],:name => "海の日", :regions => [:jp]},
35
+ {:wday => 1, :week => 3, :year_ranges => [{:after => 2021}],:name => "海の日", :regions => [:jp]},
36
+ {:function => "jp_marine_day_substitute(year)", :function_arguments => [:year], :year_ranges => [{:between => 1996..2002}],:name => "振替休日", :regions => [:jp]},
37
+ {:mday => 24, :year_ranges => [{:limited => [2020]}],:name => "スポーツの日", :regions => [:jp]}],
38
+ 8 => [{:function => "jp_mountain_holiday(year)", :function_arguments => [:year], :year_ranges => [{:between => 2016..2019}],:name => "山の日", :regions => [:jp]},
39
+ {:mday => 10, :year_ranges => [{:limited => [2020]}],:name => "山の日", :regions => [:jp]},
40
+ {:function => "jp_mountain_holiday(year)", :function_arguments => [:year], :year_ranges => [{:after => 2021}],:name => "山の日", :regions => [:jp]},
36
41
  {:function => "jp_mountain_holiday_substitute(year)", :function_arguments => [:year], :year_ranges => [{:after => 2016}],:name => "振替休日", :regions => [:jp]}],
37
42
  9 => [{:wday => 1, :week => 3, :name => "敬老の日", :regions => [:jp]},
38
43
  {:function => "jp_respect_for_aged_holiday_substitute(year)", :function_arguments => [:year], :name => "振替休日", :regions => [:jp]},
39
44
  {:function => "jp_citizens_holiday(year)", :function_arguments => [:year], :year_ranges => [{:after => 2003}],:name => "国民の休日", :regions => [:jp]},
40
45
  {:function => "jp_national_culture_day(year)", :function_arguments => [:year], :name => "秋分の日", :regions => [:jp]},
41
46
  {:function => "jp_national_culture_day_substitute(year)", :function_arguments => [:year], :name => "振替休日", :regions => [:jp]}],
42
- 10 => [{:wday => 1, :week => 2, :name => "体育の日", :regions => [:jp]},
47
+ 10 => [{:wday => 1, :week => 2, :year_ranges => [{:before => 2019}],:name => "体育の日", :regions => [:jp]},
48
+ {:wday => 1, :week => 2, :year_ranges => [{:after => 2021}],:name => "スポーツの日", :regions => [:jp]},
43
49
  {:function => "jp_health_sports_day_substitute(year)", :function_arguments => [:year], :name => "振替休日", :regions => [:jp]}],
44
50
  11 => [{:mday => 3, :name => "文化の日", :regions => [:jp]},
45
51
  {:mday => 3, :function => "jp_substitute_holiday(year, month, day)", :function_arguments => [:year, :month, :day], :name => "振替休日", :regions => [:jp]},
@@ -52,7 +58,7 @@ module Holidays
52
58
 
53
59
  def self.custom_methods
54
60
  {
55
- "jp_health_sports_day_substitute(year)" => Proc.new { |year|
61
+ "jp_health_sports_day_substitute(year)" => Proc.new { |year|
56
62
  Holidays::Factory::Definition.custom_methods_repository.find("jp_substitute_holiday(year, month, day)").call(year, 10, Holidays::Factory::DateCalculator.day_of_month_calculator.call(year, 10, 2, 1))
57
63
  },
58
64