holidays 6.6.1 → 8.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +25 -0
  3. data/CHANGELOG.md +72 -0
  4. data/README.md +10 -6
  5. data/doc/CONTRIBUTING.md +2 -1
  6. data/holidays.gemspec +5 -5
  7. data/lib/generated_definitions/MANIFEST +11 -5
  8. data/lib/generated_definitions/REGIONS.rb +2 -2
  9. data/lib/generated_definitions/ar.rb +28 -9
  10. data/lib/generated_definitions/at.rb +2 -2
  11. data/lib/generated_definitions/au.rb +47 -10
  12. data/lib/generated_definitions/be_fr.rb +2 -2
  13. data/lib/generated_definitions/be_nl.rb +2 -2
  14. data/lib/generated_definitions/bg.rb +2 -2
  15. data/lib/generated_definitions/br.rb +2 -2
  16. data/lib/generated_definitions/ca.rb +25 -17
  17. data/lib/generated_definitions/ch.rb +15 -3
  18. data/lib/generated_definitions/cl.rb +7 -7
  19. data/lib/generated_definitions/co.rb +2 -2
  20. data/lib/generated_definitions/cr.rb +2 -2
  21. data/lib/generated_definitions/cz.rb +2 -2
  22. data/lib/generated_definitions/de.rb +11 -7
  23. data/lib/generated_definitions/dk.rb +3 -3
  24. data/lib/generated_definitions/{ecb_target.rb → ecbtarget.rb} +10 -10
  25. data/lib/generated_definitions/ee.rb +2 -2
  26. data/lib/generated_definitions/el.rb +2 -2
  27. data/lib/generated_definitions/es.rb +6 -4
  28. data/lib/generated_definitions/europe.rb +119 -32
  29. data/lib/generated_definitions/{federal_reserve.rb → federalreserve.rb} +15 -14
  30. data/lib/generated_definitions/federalreservebanks.rb +35 -0
  31. data/lib/generated_definitions/fedex.rb +2 -2
  32. data/lib/generated_definitions/fi.rb +2 -2
  33. data/lib/generated_definitions/fr.rb +4 -4
  34. data/lib/generated_definitions/gb.rb +15 -7
  35. data/lib/generated_definitions/ge.rb +2 -2
  36. data/lib/generated_definitions/hk.rb +2 -2
  37. data/lib/generated_definitions/hr.rb +10 -8
  38. data/lib/generated_definitions/hu.rb +4 -3
  39. data/lib/generated_definitions/ie.rb +2 -2
  40. data/lib/generated_definitions/is.rb +2 -2
  41. data/lib/generated_definitions/it.rb +16 -7
  42. data/lib/generated_definitions/jp.rb +31 -16
  43. data/lib/generated_definitions/kr.rb +2 -2
  44. data/lib/generated_definitions/kz.rb +38 -0
  45. data/lib/generated_definitions/li.rb +2 -2
  46. data/lib/generated_definitions/lt.rb +2 -2
  47. data/lib/generated_definitions/lu.rb +4 -2
  48. data/lib/generated_definitions/lv.rb +56 -0
  49. data/lib/generated_definitions/ma.rb +2 -2
  50. data/lib/generated_definitions/mt_en.rb +2 -2
  51. data/lib/generated_definitions/mt_mt.rb +2 -2
  52. data/lib/generated_definitions/mx.rb +7 -7
  53. data/lib/generated_definitions/my.rb +2 -2
  54. data/lib/generated_definitions/nerc.rb +2 -2
  55. data/lib/generated_definitions/ng.rb +33 -0
  56. data/lib/generated_definitions/nl.rb +2 -2
  57. data/lib/generated_definitions/no.rb +2 -2
  58. data/lib/generated_definitions/{north_america.rb → northamerica.rb} +34 -26
  59. data/lib/generated_definitions/nyse.rb +3 -2
  60. data/lib/generated_definitions/nz.rb +41 -3
  61. data/lib/generated_definitions/pe.rb +2 -2
  62. data/lib/generated_definitions/ph.rb +2 -2
  63. data/lib/generated_definitions/pl.rb +2 -2
  64. data/lib/generated_definitions/pt.rb +2 -2
  65. data/lib/generated_definitions/ro.rb +6 -3
  66. data/lib/generated_definitions/rs_cyrl.rb +3 -3
  67. data/lib/generated_definitions/rs_la.rb +3 -3
  68. data/lib/generated_definitions/ru.rb +2 -2
  69. data/lib/generated_definitions/scandinavia.rb +3 -3
  70. data/lib/generated_definitions/se.rb +2 -2
  71. data/lib/generated_definitions/sg.rb +2 -2
  72. data/lib/generated_definitions/si.rb +4 -3
  73. data/lib/generated_definitions/sk.rb +2 -2
  74. data/lib/generated_definitions/{south_america.rb → southamerica.rb} +32 -13
  75. data/lib/generated_definitions/th.rb +36 -0
  76. data/lib/generated_definitions/tn.rb +2 -2
  77. data/lib/generated_definitions/tr.rb +7 -5
  78. data/lib/generated_definitions/ua.rb +37 -0
  79. data/lib/generated_definitions/{united_nations.rb → unitednations.rb} +61 -61
  80. data/lib/generated_definitions/ups.rb +2 -2
  81. data/lib/generated_definitions/us.rb +9 -9
  82. data/lib/generated_definitions/ve.rb +2 -2
  83. data/lib/generated_definitions/vi.rb +2 -2
  84. data/lib/generated_definitions/za.rb +3 -3
  85. data/lib/holidays/definition/context/generator.rb +23 -70
  86. data/lib/holidays/definition/generator/module.rb +54 -0
  87. data/lib/holidays/definition/generator/regions.rb +1 -1
  88. data/lib/holidays/definition/repository/holidays_by_month.rb +9 -1
  89. data/lib/holidays/factory/definition.rb +7 -0
  90. data/lib/holidays/finder/context/search.rb +35 -31
  91. data/lib/holidays/finder/rules/year_range.rb +30 -54
  92. data/lib/holidays/version.rb +1 -1
  93. data/lib/holidays.rb +2 -0
  94. data/test/coverage_report.rb +23 -5
  95. data/test/data/test_custom_year_range_holiday_defs.yaml +6 -10
  96. data/test/data/test_multiple_regions_with_conflicts_region_1.yaml +38 -0
  97. data/test/data/test_multiple_regions_with_conflicts_region_2.yaml +38 -0
  98. data/test/defs/test_defs_ar.rb +20 -4
  99. data/test/defs/test_defs_au.rb +22 -0
  100. data/test/defs/test_defs_ca.rb +71 -8
  101. data/test/defs/test_defs_ch.rb +4 -0
  102. data/test/defs/test_defs_co.rb +3 -3
  103. data/test/defs/test_defs_de.rb +8 -0
  104. data/test/defs/test_defs_dk.rb +4 -0
  105. data/test/defs/{test_defs_ecb_target.rb → test_defs_ecbtarget.rb} +11 -11
  106. data/test/defs/test_defs_es.rb +2 -0
  107. data/test/defs/test_defs_europe.rb +233 -14
  108. data/test/defs/test_defs_federalreserve.rb +119 -0
  109. data/test/defs/test_defs_federalreservebanks.rb +251 -0
  110. data/test/defs/test_defs_fr.rb +3 -3
  111. data/test/defs/test_defs_gb.rb +42 -0
  112. data/test/defs/test_defs_hr.rb +6 -6
  113. data/test/defs/test_defs_hu.rb +12 -4
  114. data/test/defs/test_defs_it.rb +20 -0
  115. data/test/defs/test_defs_jp.rb +22 -2
  116. data/test/defs/test_defs_kz.rb +39 -0
  117. data/test/defs/test_defs_lu.rb +6 -0
  118. data/test/defs/test_defs_lv.rb +98 -0
  119. data/test/defs/test_defs_mx.rb +3 -1
  120. data/test/defs/test_defs_ng.rb +29 -0
  121. data/test/defs/{test_defs_north_america.rb → test_defs_northamerica.rb} +85 -20
  122. data/test/defs/test_defs_nyse.rb +7 -0
  123. data/test/defs/test_defs_nz.rb +4 -0
  124. data/test/defs/test_defs_ro.rb +14 -0
  125. data/test/defs/test_defs_rs_cyrl.rb +1 -1
  126. data/test/defs/test_defs_rs_la.rb +1 -1
  127. data/test/defs/test_defs_scandinavia.rb +4 -0
  128. data/test/defs/{test_defs_south_america.rb → test_defs_southamerica.rb} +25 -9
  129. data/test/defs/test_defs_th.rb +33 -0
  130. data/test/defs/test_defs_tr.rb +7 -0
  131. data/test/defs/test_defs_ua.rb +41 -0
  132. data/test/defs/{test_defs_united_nations.rb → test_defs_unitednations.rb} +3 -3
  133. data/test/defs/test_defs_us.rb +11 -11
  134. data/test/holidays/core_extensions/test_date.rb +3 -2
  135. data/test/holidays/definition/context/test_generator.rb +17 -20
  136. data/test/holidays/definition/generator/test_module.rb +268 -0
  137. data/test/holidays/definition/repository/test_holidays_by_month.rb +121 -1
  138. data/test/holidays/finder/rules/test_year_range.rb +43 -47
  139. data/test/integration/test_available_regions.rb +1 -1
  140. data/test/integration/test_custom_year_range_holidays.rb +0 -7
  141. data/test/integration/test_holidays.rb +2 -36
  142. data/test/integration/test_holidays_between.rb +11 -1
  143. data/test/integration/test_multiple_regions_with_conflict.rb +29 -0
  144. data/test/integration/test_nonstandard_regions.rb +25 -0
  145. metadata +61 -32
  146. data/test/defs/test_defs_federal_reserve.rb +0 -113
@@ -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 => "Karfreitag", :regions => [: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]},
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Karfreitag", :regions => [: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]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Ostermontag", :regions => [: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_vs, :ch_ge, :ch_ju]},
17
17
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Auffahrt", :regions => [:ch]},
18
18
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "Pfingstmontag", :regions => [: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_vs, :ch_ge, :ch_ju]},
@@ -32,7 +32,8 @@ module Holidays
32
32
  {:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_zg, :ch_fr, :ch_so, :ch_ai, :ch_ag, :ch_ti, :ch_vs, :ch_ju]}],
33
33
  9 => [{:mday => 22, :name => "Mauritiustag", :regions => [:ch_ai]},
34
34
  {:mday => 25, :name => "Bruderklausenfest", :regions => [:ch_ow]}],
35
- 11 => [{:mday => 1, :name => "Allerheiligen", :regions => [:ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_ai, :ch_sg, :ch_ag, :ch_ti, :ch_vs, :ch_ju]}],
35
+ 11 => [{:function => "ch_be_zibelemaerit(year)", :function_arguments => [:year], :name => "Zibelemärit", :regions => [:ch_be]},
36
+ {:mday => 1, :name => "Allerheiligen", :regions => [:ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_ai, :ch_sg, :ch_ag, :ch_ti, :ch_vs, :ch_ju]}],
36
37
  12 => [{:mday => 8, :name => "Maria Empfängnis", :regions => [:ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_zg, :ch_fr, :ch_ai, :ch_ag, :ch_ti, :ch_vs]},
37
38
  {:mday => 25, :name => "Weihnachten", :regions => [:ch]},
38
39
  {:mday => 26, :name => "Stefanstag", :regions => [: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_vs, :ch_ne]},
@@ -42,7 +43,7 @@ module Holidays
42
43
 
43
44
  def self.custom_methods
44
45
  {
45
- "ch_vd_lundi_du_jeune_federal(year)" => Proc.new { |year|
46
+ "ch_vd_lundi_du_jeune_federal(year)" => Proc.new { |year|
46
47
  date = Date.civil(year,9,1)
47
48
  # Find the first Sunday of September
48
49
  until date.wday.eql? 0 do
@@ -76,6 +77,17 @@ end
76
77
  date
77
78
  },
78
79
 
80
+ "ch_be_zibelemaerit(year)" => Proc.new { |year|
81
+ date = Date.civil(year,11,1)
82
+ # Find the first Monday of November
83
+ until date.wday.eql? 1 do
84
+ date += 1
85
+ end
86
+ # There are 21 days between the first monday
87
+ # and the 4rth Monday after
88
+ date + 21
89
+ },
90
+
79
91
 
80
92
  }
81
93
  end
@@ -12,20 +12,20 @@ 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 => "Viernes Santo", :regions => [:cl]},
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:cl]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -1, :name => "Sábado Santo", :regions => [:cl]},
17
- {:function => "st_peter_st_paul_cl(year)", :function_arguments => [:year], :year_ranges => [{:after => 2000}],:name => "San Pedro y San Pablo", :regions => [:cl]},
18
- {:function => "other_churches_day_cl(year)", :function_arguments => [:year], :year_ranges => [{:after => 2008}],:name => "Día de las Iglesias Evangélicas y Protestantes", :regions => [:cl]}],
17
+ {:function => "st_peter_st_paul_cl(year)", :function_arguments => [:year], :year_ranges => { :from => 2000 },:name => "San Pedro y San Pablo", :regions => [:cl]},
18
+ {:function => "other_churches_day_cl(year)", :function_arguments => [:year], :year_ranges => { :from => 2008 },:name => "Día de las Iglesias Evangélicas y Protestantes", :regions => [:cl]}],
19
19
  1 => [{:mday => 1, :name => "Año Nuevo", :regions => [:cl]}],
20
20
  5 => [{:mday => 1, :name => "Día del Trabajo", :regions => [:cl]},
21
21
  {:mday => 21, :name => "Día de las Glorias Navales", :regions => [:cl]}],
22
- 6 => [{:mday => 29, :year_ranges => [{:before => 1999}],:name => "San Pedro y San Pablo", :regions => [:cl]}],
22
+ 6 => [{:mday => 29, :year_ranges => { :until => 1999 },:name => "San Pedro y San Pablo", :regions => [:cl]}],
23
23
  7 => [{:mday => 16, :name => "Día de la Virgen del Carmen", :regions => [:cl]}],
24
24
  8 => [{:mday => 15, :name => "Asunción de la Virgen", :regions => [:cl]}],
25
25
  9 => [{:mday => 18, :name => "Independencia Nacional", :regions => [:cl]},
26
26
  {:mday => 19, :name => "Día de las Glorias del Ejército", :regions => [:cl]}],
27
- 10 => [{:mday => 12, :year_ranges => [{:before => 1999}],:name => "Encuentro de Dos Mundos", :regions => [:cl]},
28
- {:function => "columbus_day_cl(year)", :function_arguments => [:year], :year_ranges => [{:after => 2000}],:name => "Encuentro de Dos Mundos", :regions => [:cl]}],
27
+ 10 => [{:mday => 12, :year_ranges => { :until => 1999 },:name => "Encuentro de Dos Mundos", :regions => [:cl]},
28
+ {:function => "columbus_day_cl(year)", :function_arguments => [:year], :year_ranges => { :from => 2000 },:name => "Encuentro de Dos Mundos", :regions => [:cl]}],
29
29
  11 => [{:mday => 1, :name => "Día de Todos los Santos", :regions => [:cl]}],
30
30
  12 => [{:mday => 8, :name => "Inmaculada Concepción de María", :regions => [:cl]},
31
31
  {:mday => 25, :name => "Navidad", :regions => [:cl]}]
@@ -34,7 +34,7 @@ module Holidays
34
34
 
35
35
  def self.custom_methods
36
36
  {
37
- "st_peter_st_paul_cl(year)" => Proc.new { |year|
37
+ "st_peter_st_paul_cl(year)" => Proc.new { |year|
38
38
  date = Date.civil(year, 6, 29)
39
39
  if [2,3,4].include?(date.wday)
40
40
  date -= (date.wday - 1)
@@ -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 => [:co]},
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Jueves Santo", :regions => [:co]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:co]},
17
17
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 43, :name => "Día de la Ascensión", :regions => [:co]},
18
18
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 64, :name => "Corpus Christi", :regions => [:co]},
@@ -35,7 +35,7 @@ module Holidays
35
35
 
36
36
  def self.custom_methods
37
37
  {
38
- "to_following_monday_if_not_monday(date)" => Proc.new { |date|
38
+ "to_following_monday_if_not_monday(date)" => Proc.new { |date|
39
39
  if date.wday > 1
40
40
  date += ( 8 - date.wday )
41
41
  elsif date.wday == 0
@@ -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 => [:cr]},
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Jueves Santo", :regions => [:cr]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:cr]}],
17
17
  1 => [{:mday => 1, :name => "Año Nuevo", :regions => [:cr]}],
18
18
  4 => [{:mday => 11, :name => "Día de Juan Santamaría", :regions => [:cr]}],
@@ -28,7 +28,7 @@ module Holidays
28
28
 
29
29
  def self.custom_methods
30
30
  {
31
-
31
+
32
32
  }
33
33
  end
34
34
  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 => "Velký pátek", :regions => [:cz]},
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Velký pátek", :regions => [:cz]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Velikonoční pondělí", :regions => [:cz]}],
17
17
  1 => [{:mday => 1, :name => "Den obnovy samostatného českého státu", :regions => [:cz]}],
18
18
  5 => [{:mday => 1, :name => "Svátek práce", :regions => [:cz]},
@@ -30,7 +30,7 @@ module Holidays
30
30
 
31
31
  def self.custom_methods
32
32
  {
33
-
33
+
34
34
  }
35
35
  end
36
36
  end
@@ -7,12 +7,12 @@ module Holidays
7
7
  # All the definitions are available at https://github.com/holidays/holidays
8
8
  module DE # :nodoc:
9
9
  def self.defined_regions
10
- [: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]
10
+ [:de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn_sorbian, :de_th_cath, :de_sn, :de_st, :de_be, :de_mv, :de_by_cath, :de_by_augsburg, :de_bb, :de_th, :de_hb, :de_hh, :de_ni, :de_sh]
11
11
  end
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Karfreitag", :regions => [:de]},
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Karfreitag", :regions => [:de]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :type => :informal, :name => "Ostersonntag", :regions => [:de]},
17
17
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Ostermontag", :regions => [:de]},
18
18
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Christi Himmelfahrt", :regions => [:de]},
@@ -24,14 +24,18 @@ module Holidays
24
24
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -46, :type => :informal, :name => "Aschermittwoch", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn]}],
25
25
  1 => [{:mday => 1, :name => "Neujahrstag", :regions => [:de]},
26
26
  {:mday => 6, :name => "Heilige Drei Könige", :regions => [:de_bw, :de_by, :de_st]}],
27
- 5 => [{:mday => 1, :name => "Tag der Arbeit", :regions => [:de]}],
27
+ 3 => [{:mday => 8, :year_ranges => { :from => 2019 },:name => "Internationaler Frauentag", :regions => [:de_be]},
28
+ {:mday => 8, :year_ranges => { :from => 2023 },:name => "Internationaler Frauentag", :regions => [:de_mv]}],
29
+ 5 => [{:mday => 1, :name => "Tag der Arbeit", :regions => [:de]},
30
+ {:mday => 8, :year_ranges => { :limited => [2020] },:name => "Tag der Befreiung", :regions => [:de_be]}],
31
+ 6 => [{:mday => 17, :year_ranges => { :between => 1954..1990 },:name => "Tag der Deutschen Einheit", :regions => [:de]}],
28
32
  8 => [{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:de_by_cath, :de_by_augsburg, :de_sl]},
29
33
  {:mday => 8, :name => "Friedensfest", :regions => [:de_by_augsburg]}],
30
- 10 => [{:mday => 3, :name => "Tag der Deutschen Einheit", :regions => [:de]},
34
+ 10 => [{:mday => 3, :year_ranges => { :from => 1990 },:name => "Tag der Deutschen Einheit", :regions => [:de]},
31
35
  {:mday => 31, :name => "Reformationstag", :regions => [:de_bb, :de_mv, :de_sn, :de_st, :de_th]},
32
36
  {:mday => 31, :type => :informal, :name => "Reformationstag", :regions => [:de_bw]},
33
- {:mday => 31, :year_ranges => [{:limited => [2017]}],:name => "Reformationstag", :regions => [:de]},
34
- {:mday => 31, :year_ranges => [{:after => 2018}],:name => "Reformationstag", :regions => [:de_hb, :de_hh, :de_ni, :de_sh]}],
37
+ {:mday => 31, :year_ranges => { :limited => [2017] },:name => "Reformationstag", :regions => [:de]},
38
+ {:mday => 31, :year_ranges => { :from => 2018 },:name => "Reformationstag", :regions => [:de_hb, :de_hh, :de_ni, :de_sh]}],
35
39
  11 => [{:mday => 1, :name => "Allerheiligen", :regions => [:de_bw, :de_by, :de_nw, :de_rp, :de_sl]},
36
40
  {:function => "de_buss_und_bettag(year)", :function_arguments => [:year], :name => "Buß- und Bettag", :regions => [:de_sn]}],
37
41
  12 => [{:mday => 24, :type => :informal, :name => "Heilig Abend", :regions => [:de]},
@@ -43,7 +47,7 @@ module Holidays
43
47
 
44
48
  def self.custom_methods
45
49
  {
46
- "de_buss_und_bettag(year)" => Proc.new { |year|
50
+ "de_buss_und_bettag(year)" => Proc.new { |year|
47
51
  date = Date.civil(year,11,23)
48
52
  if date.wday > 3
49
53
  date -= (date.wday - 3)
@@ -12,13 +12,13 @@ module Holidays
12
12
 
13
13
  def self.holidays_by_month
14
14
  {
15
- 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -49, :type => :informal, :name => "Fastelavn", :regions => [:dk]},
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -49, :type => :informal, :name => "Fastelavn", :regions => [:dk]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -7, :type => :informal, :name => "Palmesøndag", :regions => [:dk]},
17
17
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Skærtorsdag", :regions => [:dk]},
18
18
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Langfredag", :regions => [:dk]},
19
19
  {:function => "easter(year)", :function_arguments => [:year], :name => "Påskedag", :regions => [:dk]},
20
20
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "2. påskedag", :regions => [:dk]},
21
- {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 26, :name => "Store Bededag", :regions => [:dk]},
21
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 26, :year_ranges => { :until => 2023 },:name => "Store Bededag", :regions => [:dk]},
22
22
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 39, :name => "Kristi Himmelfartsdag", :regions => [:dk]},
23
23
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :name => "Pinsedag", :regions => [:dk]},
24
24
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "2. Pinsedag", :regions => [:dk]}],
@@ -41,7 +41,7 @@ module Holidays
41
41
 
42
42
  def self.custom_methods
43
43
  {
44
-
44
+
45
45
  }
46
46
  end
47
47
  end
@@ -2,28 +2,28 @@
2
2
  module Holidays
3
3
  # This file is generated by the Ruby Holidays gem.
4
4
  #
5
- # Definitions loaded: definitions/ecb_target.yaml
5
+ # Definitions loaded: definitions/ecbtarget.yaml
6
6
  #
7
7
  # All the definitions are available at https://github.com/holidays/holidays
8
- module ECB_TARGET # :nodoc:
8
+ module ECBTARGET # :nodoc:
9
9
  def self.defined_regions
10
- [:ecb_target]
10
+ [:ecbtarget]
11
11
  end
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 => [:ecb_target]},
16
- {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:ecb_target]}],
17
- 1 => [{:mday => 1, :name => "New Year's Day", :regions => [:ecb_target]}],
18
- 5 => [{:mday => 1, :name => "Labour Day", :regions => [:ecb_target]}],
19
- 12 => [{:mday => 25, :name => "Christmas Day", :regions => [:ecb_target]},
20
- {:mday => 26, :name => "Christmas Holiday", :regions => [:ecb_target]}]
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Good Friday", :regions => [:ecbtarget]},
16
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Easter Monday", :regions => [:ecbtarget]}],
17
+ 1 => [{:mday => 1, :name => "New Year's Day", :regions => [:ecbtarget]}],
18
+ 5 => [{:mday => 1, :name => "Labour Day", :regions => [:ecbtarget]}],
19
+ 12 => [{:mday => 25, :name => "Christmas Day", :regions => [:ecbtarget]},
20
+ {:mday => 26, :name => "Christmas Holiday", :regions => [:ecbtarget]}]
21
21
  }
22
22
  end
23
23
 
24
24
  def self.custom_methods
25
25
  {
26
-
26
+
27
27
  }
28
28
  end
29
29
  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 => "suur reede", :regions => [:ee]},
15
+ 0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "suur reede", :regions => [:ee]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :name => "ülestõusmispühade 1. püha", :regions => [:ee]},
17
17
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 49, :name => "nelipühade 1. püha", :regions => [:ee]}],
18
18
  1 => [{:mday => 1, :name => "uusaasta", :regions => [:ee]}],
@@ -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
- 0 => [{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Μεγάλη Παρασκευή", :regions => [:el]},
15
+ 0 => [{:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Μεγάλη Παρασκευή", :regions => [:el]},
16
16
  {:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => -1, :name => "Μεγάλο Σάββατο", :regions => [:el]},
17
17
  {:function => "orthodox_easter(year)", :function_arguments => [:year], :name => "Κυριακή του Πάσχα", :regions => [:el]},
18
18
  {:function => "orthodox_easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Δευτέρα του Πάσχα", :regions => [:el]},
@@ -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,9 +12,10 @@ 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
- {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Lunes de Pascua", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]}],
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
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "Lunes de Pascua Granada", :regions => [:es_ct]}],
18
19
  1 => [{:mday => 1, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Año Nuevo", :regions => [:es]},
19
20
  {:mday => 6, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de Reyes", :regions => [:es]}],
20
21
  2 => [{:mday => 28, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de Andalucía", :regions => [:es_an]}],
@@ -27,7 +28,8 @@ module Holidays
27
28
  {:mday => 30, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de las Canarias", :regions => [:es_cn]},
28
29
  {:mday => 31, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de la Región Castilla-La Mancha", :regions => [:es_cm]}],
29
30
  6 => [{:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de la Región de Murcia", :regions => [:es_mu]},
30
- {:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de La Rioja", :regions => [:es_lo]}],
31
+ {:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de La Rioja", :regions => [:es_lo]},
32
+ {:mday => 24, :name => "San Juan", :regions => [:es_ct, :es_vc]}],
31
33
  7 => [{:mday => 23, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Santiago Apostol", :regions => [:es_ga]}],
32
34
  8 => [{:mday => 15, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Asunción", :regions => [:es]}],
33
35
  9 => [{:mday => 2, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de Ceuta", :regions => [:es_ce]},
@@ -47,7 +49,7 @@ module Holidays
47
49
 
48
50
  def self.custom_methods
49
51
  {
50
-
52
+
51
53
  }
52
54
  end
53
55
  end