holidays 0.9.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. data/.gitignore +3 -0
  2. data/CHANGELOG +7 -0
  3. data/{README → README.rdoc} +36 -39
  4. data/data/SYNTAX +1 -1
  5. data/data/au.yaml +110 -105
  6. data/data/build_defs.rb +4 -3
  7. data/data/ca.yaml +140 -140
  8. data/data/cz.yaml +68 -0
  9. data/data/de.yaml +12 -14
  10. data/data/dk.yaml +1 -1
  11. data/data/es.yaml +1 -1
  12. data/data/fr.yaml +1 -1
  13. data/data/gb.yaml +1 -1
  14. data/data/ie.yaml +1 -1
  15. data/data/index.yaml +7 -2
  16. data/data/is.yaml +1 -1
  17. data/data/it.yaml +1 -1
  18. data/data/mx.yaml +1 -1
  19. data/data/nl.yaml +1 -1
  20. data/data/no.yaml +82 -0
  21. data/data/nyse.yaml +1 -1
  22. data/data/nz.yaml +141 -0
  23. data/data/pt.yaml +1 -1
  24. data/data/se.yaml +1 -1
  25. data/data/united_nations.yaml +188 -188
  26. data/data/ups.yaml +55 -55
  27. data/data/us.yaml +80 -80
  28. data/data/za.yaml +1 -1
  29. data/holidays.gemspec +155 -0
  30. data/lib/holidays.rb +424 -403
  31. data/lib/holidays/MANIFEST +28 -25
  32. data/lib/holidays/au.rb +43 -41
  33. data/lib/holidays/ca.rb +69 -68
  34. data/lib/holidays/cz.rb +36 -0
  35. data/lib/holidays/de.rb +51 -52
  36. data/lib/holidays/dk.rb +48 -47
  37. data/lib/holidays/es.rb +53 -52
  38. data/lib/holidays/europe.rb +236 -215
  39. data/lib/holidays/fr.rb +37 -36
  40. data/lib/holidays/gb.rb +41 -40
  41. data/lib/holidays/ie.rb +33 -32
  42. data/lib/holidays/is.rb +62 -61
  43. data/lib/holidays/it.rb +36 -35
  44. data/lib/holidays/mx.rb +52 -51
  45. data/lib/holidays/nl.rb +37 -36
  46. data/lib/holidays/no.rb +40 -0
  47. data/lib/holidays/north_america.rb +108 -107
  48. data/lib/holidays/nyse.rb +33 -32
  49. data/lib/holidays/nz.rb +69 -0
  50. data/lib/holidays/pt.rb +38 -52
  51. data/lib/holidays/scandinavia.rb +124 -114
  52. data/lib/holidays/se.rb +53 -52
  53. data/lib/holidays/united_nations.rb +25 -24
  54. data/lib/holidays/ups.rb +32 -31
  55. data/lib/holidays/us.rb +49 -48
  56. data/lib/holidays/za.rb +36 -35
  57. data/rakefile.rb +105 -113
  58. data/test/defs/test_defs_au.rb +36 -36
  59. data/test/defs/test_defs_ca.rb +29 -29
  60. data/test/defs/test_defs_cz.rb +26 -0
  61. data/test/defs/test_defs_de.rb +51 -46
  62. data/test/defs/test_defs_dk.rb +30 -30
  63. data/test/defs/test_defs_es.rb +57 -57
  64. data/test/defs/test_defs_europe.rb +280 -240
  65. data/test/defs/test_defs_fr.rb +26 -26
  66. data/test/defs/test_defs_gb.rb +36 -36
  67. data/test/defs/test_defs_ie.rb +21 -21
  68. data/test/defs/test_defs_is.rb +33 -33
  69. data/test/defs/test_defs_it.rb +25 -25
  70. data/test/defs/test_defs_mx.rb +22 -22
  71. data/test/defs/test_defs_nl.rb +24 -24
  72. data/test/defs/test_defs_no.rb +29 -0
  73. data/test/defs/test_defs_north_america.rb +54 -54
  74. data/test/defs/test_defs_nyse.rb +22 -22
  75. data/test/defs/test_defs_nz.rb +22 -0
  76. data/test/defs/test_defs_pt.rb +32 -32
  77. data/test/defs/test_defs_scandinavia.rb +94 -75
  78. data/test/defs/test_defs_se.rb +32 -32
  79. data/test/defs/test_defs_ups.rb +21 -21
  80. data/test/defs/test_defs_us.rb +23 -23
  81. data/test/defs/test_defs_za.rb +25 -25
  82. data/test/test_date.rb +123 -0
  83. data/test/test_helper.rb +22 -0
  84. data/test/test_holidays.rb +128 -0
  85. data/test/test_multiple_regions.rb +24 -0
  86. metadata +126 -73
@@ -1,52 +1,53 @@
1
- module Holidays
2
- # This file is generated by the Ruby Holiday gem.
3
- #
4
- # Definitions loaded: data/es.yaml
5
- #
6
- # To use the definitions in this file, load them right after you load the
7
- # Holiday gem:
8
- #
9
- # require 'holidays'
10
- # require 'holidays/es'
11
- #
12
- # More definitions are available at http://code.dunae.ca/holidays.
13
- module ES # :nodoc:
14
- DEFINED_REGIONS = [:es, :es_m, :es_cn, :es_cm, :es_pv, :es_ct, :es_na, :es_v, :es_vc, :es_mu, :es_lo, :es_ib, :es_ga, :es_an, :es_ce, :es_o, :es_ex, :es_ar, :es_cl]
15
-
16
- HOLIDAYS_BY_MONTH = {
17
- 5 => [{:mday => 1, :name => "Día del Trabajador", :regions => [:es]},
18
- {:mday => 2, :name => "Fiesta de la Comunidad", :regions => [:es_m]},
19
- {:mday => 30, :name => "Día de las Canarias", :regions => [:es_cn]},
20
- {:mday => 31, :name => "Día de la Región Castilla-La Mancha", :regions => [:es_cm]}],
21
- 0 => [{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Jueves Santo", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]},
22
- {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Viernes Santo", :regions => [:es]},
23
- {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lunes de Pascua", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]}],
24
- 11 => [{:mday => 1, :name => "Todos los Santos", :regions => [:es]}],
25
- 6 => [{:mday => 9, :name => "Día de la Región de Murcia", :regions => [:es_mu]},
26
- {:mday => 9, :name => "Día de La Rioja", :regions => [:es_lo]}],
27
- 1 => [{:mday => 1, :name => "Año Nuevo", :regions => [:es]},
28
- {:mday => 6, :name => "Día de Reyes", :regions => [:es]}],
29
- 12 => [{:mday => 6, :name => "Día de la Constitución", :regions => [:es]},
30
- {:mday => 8, :name => "Inmaculada Concepción", :regions => [:es]},
31
- {:mday => 25, :name => "Navidad del Señor", :regions => [:es]},
32
- {:mday => 26, :name => "San Esteban", :regions => [:es_ib, :es_ct]}],
33
- 7 => [{:mday => 23, :name => "Santiago Apostol", :regions => [:es_ga]}],
34
- 2 => [{:mday => 28, :name => "Día de Andalucía", :regions => [:es_an]}],
35
- 8 => [{:mday => 15, :name => "Asunción", :regions => [:es]}],
36
- 3 => [{:mday => 1, :name => "Día de las Islas Baleares", :regions => [:es_ib]},
37
- {:mday => 19, :name => "San José", :regions => [:es_v, :es_vc, :es_cm, :es_mu, :es_m]}],
38
- 9 => [{:mday => 2, :name => "Día de Ceuta", :regions => [:es_ce]},
39
- {:mday => 8, :name => "Día de Asturias", :regions => [:es_o]},
40
- {:mday => 8, :name => "Día de Extremadura", :regions => [:es_ex]},
41
- {:mday => 11, :name => "Fiesta Nacional de Cataluña", :regions => [:es_ct]}],
42
- 4 => [{:mday => 23, :name => "San Jorge", :regions => [:es_ar, :es_cl]},
43
- {:mday => 23, :name => "Día de Aragón", :regions => [:es_ar]}],
44
- 10 => [{:mday => 9, :name => "Día de Valencia", :regions => [:es_vc, :es_v]},
45
- {:mday => 12, :name => "Día de la Hispanidad", :regions => [:es]}]
46
- }
47
- end
48
-
49
-
50
- end
51
-
52
- Holidays.merge_defs(Holidays::ES::DEFINED_REGIONS, Holidays::ES::HOLIDAYS_BY_MONTH)
1
+ # encoding: utf-8
2
+ module Holidays
3
+ # This file is generated by the Ruby Holiday gem.
4
+ #
5
+ # Definitions loaded: data/es.yaml
6
+ #
7
+ # To use the definitions in this file, load them right after you load the
8
+ # Holiday gem:
9
+ #
10
+ # require 'holidays'
11
+ # require 'holidays/es'
12
+ #
13
+ # More definitions are available at http://code.dunae.ca/holidays.
14
+ module ES # :nodoc:
15
+ DEFINED_REGIONS = [:es_pv, :es_ct, :es_na, :es_v, :es_vc, :es, :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
+
17
+ HOLIDAYS_BY_MONTH = {
18
+ 0 => [{:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Jueves Santo", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]},
19
+ {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Viernes Santo", :regions => [:es]},
20
+ {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lunes de Pascua", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]}],
21
+ 1 => [{:mday => 1, :name => "Año Nuevo", :regions => [:es]},
22
+ {:mday => 6, :name => "Día de Reyes", :regions => [:es]}],
23
+ 2 => [{:mday => 28, :name => "Día de Andalucía", :regions => [:es_an]}],
24
+ 3 => [{:mday => 1, :name => "Día de las Islas Baleares", :regions => [:es_ib]},
25
+ {:mday => 19, :name => "San José", :regions => [:es_v, :es_vc, :es_cm, :es_mu, :es_m]}],
26
+ 4 => [{:mday => 23, :name => "San Jorge", :regions => [:es_ar, :es_cl]},
27
+ {:mday => 23, :name => "Día de Aragón", :regions => [:es_ar]}],
28
+ 5 => [{:mday => 1, :name => "Día del Trabajador", :regions => [:es]},
29
+ {:mday => 2, :name => "Fiesta de la Comunidad", :regions => [:es_m]},
30
+ {:mday => 30, :name => "Día de las Canarias", :regions => [:es_cn]},
31
+ {:mday => 31, :name => "Día de la Región Castilla-La Mancha", :regions => [:es_cm]}],
32
+ 6 => [{:mday => 9, :name => "Día de la Región de Murcia", :regions => [:es_mu]},
33
+ {:mday => 9, :name => "Día de La Rioja", :regions => [:es_lo]}],
34
+ 7 => [{:mday => 23, :name => "Santiago Apostol", :regions => [:es_ga]}],
35
+ 8 => [{:mday => 15, :name => "Asunción", :regions => [:es]}],
36
+ 9 => [{:mday => 2, :name => "Día de Ceuta", :regions => [:es_ce]},
37
+ {:mday => 8, :name => "Día de Asturias", :regions => [:es_o]},
38
+ {:mday => 8, :name => "Día de Extremadura", :regions => [:es_ex]},
39
+ {:mday => 11, :name => "Fiesta Nacional de Cataluña", :regions => [:es_ct]}],
40
+ 10 => [{:mday => 9, :name => "Día de Valencia", :regions => [:es_vc, :es_v]},
41
+ {:mday => 12, :name => "Día de la Hispanidad", :regions => [:es]}],
42
+ 11 => [{:mday => 1, :name => "Todos los Santos", :regions => [:es]}],
43
+ 12 => [{:mday => 6, :name => "Día de la Constitución", :regions => [:es]},
44
+ {:mday => 8, :name => "Inmaculada Concepción", :regions => [:es]},
45
+ {:mday => 25, :name => "Navidad del Señor", :regions => [:es]},
46
+ {:mday => 26, :name => "San Esteban", :regions => [:es_ib, :es_ct]}]
47
+ }
48
+ end
49
+
50
+
51
+ end
52
+
53
+ Holidays.merge_defs(Holidays::ES::DEFINED_REGIONS, Holidays::ES::HOLIDAYS_BY_MONTH)
@@ -1,215 +1,236 @@
1
- module Holidays
2
- # This file is generated by the Ruby Holiday gem.
3
- #
4
- # Definitions loaded: data/dk.yaml, data/de.yaml, data/es.yaml, data/fr.yaml, data/gb.yaml, data/ie.yaml, data/is.yaml, data/it.yaml, data/nl.yaml, data/pt.yaml
5
- #
6
- # To use the definitions in this file, load them right after you load the
7
- # Holiday gem:
8
- #
9
- # require 'holidays'
10
- # require 'holidays/europe'
11
- #
12
- # More definitions are available at http://code.dunae.ca/holidays.
13
- module Europe # :nodoc:
14
- DEFINED_REGIONS = [:dk, :de, :fr, :de_bw, :de_by, :de_nw, :de_rp, :de_sl, :de_sn, :de_he, :de_th, :de_bb, :de_mv, :de_st, :es, :es_m, :es_cn, :es_cm, :es_pv, :es_ct, :es_na, :es_v, :es_vc, :es_mu, :es_lo, :es_ib, :es_ga, :es_an, :es_ce, :es_o, :es_ex, :es_ar, :es_cl, :gb, :ie, :je, :gb_jsy, :gg, :gb_gsy, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :gb_sct, :im, :gb_iom, :gb_con, :is, :it, :nl, :pt]
15
-
16
- HOLIDAYS_BY_MONTH = {
17
- 5 => [{:mday => 1, :name => "Arbejdernes kampdag", :regions => [:dk]},
18
- {:mday => 5, :type => :informal, :name => "Danmarks befrielse", :regions => [:dk]},
19
- {:mday => 1, :name => "Tag der Arbeit", :regions => [:de]},
20
- {:mday => 8, :name => "Victoire 1945", :regions => [:de, :fr]},
21
- {:mday => 1, :name => "Día del Trabajador", :regions => [:es]},
22
- {:mday => 2, :name => "Fiesta de la Comunidad", :regions => [:es_m]},
23
- {:mday => 30, :name => "Día de las Canarias", :regions => [:es_cn]},
24
- {:mday => 31, :name => "Día de la Región Castilla-La Mancha", :regions => [:es_cm]},
25
- {:mday => 1, :name => "Fête du travail", :regions => [:fr]},
26
- {:wday => 1, :week => 1, :name => "May Day", :regions => [:gb, :ie]},
27
- {:mday => 9, :name => "Liberation Day", :regions => [:je, :gb_jsy, :gg, :gb_gsy]},
28
- {:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb]},
29
- {:mday => 1, :name => "Verkalýðsdagurinn", :regions => [:is]},
30
- {:mday => 13, :name => "Mæðradagurinn", :regions => [:is]},
31
- {:mday => 1, :name => "Festa dei Lavoratori", :regions => [:it]},
32
- {:mday => 4, :name => "Dodenherdenking", :regions => [:nl]},
33
- {:mday => 5, :name => "Bevrijdingsdag", :regions => [:nl]},
34
- {:mday => 1, :name => "Dia do Trabalhador", :regions => [:pt]}],
35
- 0 => [{:function => lambda { |year| Holidays.easter(year)-49 }, :function_id => "easter(year)-49", :type => :informal, :name => "Fastelavn", :regions => [:dk]},
36
- {:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Palmesøndag", :regions => [:dk]},
37
- {:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skærtorsdag", :regions => [:dk]},
38
- {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Langfredag", :regions => [:dk]},
39
- {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Påskedag", :regions => [:dk]},
40
- {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "2. påskedag", :regions => [:dk]},
41
- {:function => lambda { |year| Holidays.easter(year)+26 }, :function_id => "easter(year)+26", :name => "Store Bededag", :regions => [:dk]},
42
- {:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Kristi Himmelfartsdag", :regions => [:dk]},
43
- {:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pinsedag", :regions => [:dk]},
44
- {:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "2. Pinsedag", :regions => [:dk]},
45
- {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Karfreitag", :regions => [:de]},
46
- {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :type => :informal, :name => "Ostern", :regions => [:de]},
47
- {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Ostermontag", :regions => [:de]},
48
- {:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Christi Himmelfahrt", :regions => [:de]},
49
- {:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Pfingstmontag", :regions => [:de]},
50
- {:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Fronleichnam", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_sn, :de_th]},
51
- {:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Jueves Santo", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]},
52
- {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Viernes Santo", :regions => [:es]},
53
- {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lunes de Pascua", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]},
54
- {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pâques", :regions => [:fr]},
55
- {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lundi de Pâques", :regions => [:fr]},
56
- {:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Ascension", :regions => [:fr]},
57
- {:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pentecôte", :regions => [:fr]},
58
- {:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Lundi de Pentecôte", :regions => [:fr]},
59
- {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:gb]},
60
- {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Easter Sunday", :regions => [:gb]},
61
- {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Easter Monday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir, :ie]},
62
- {:function => lambda { |year| Holidays.easter(year)-48 }, :function_id => "easter(year)-48", :name => "Bolludagur", :regions => [:is]},
63
- {:function => lambda { |year| Holidays.easter(year)-47 }, :function_id => "easter(year)-47", :name => "Sprengidagur", :regions => [:is]},
64
- {:function => lambda { |year| Holidays.easter(year)-46 }, :function_id => "easter(year)-46", :name => "Öskudagur", :regions => [:is]},
65
- {:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Pálmasunnudagur", :regions => [:is]},
66
- {:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skírdagur", :regions => [:is]},
67
- {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Föstudaginn langi", :regions => [:is]},
68
- {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Páskadagur", :regions => [:is]},
69
- {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Annar í páskum", :regions => [:is]},
70
- {:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Uppstigningardagur", :regions => [:is]},
71
- {:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Hvítasunnudagur", :regions => [:is]},
72
- {:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Annar í hvítasunnu", :regions => [:is]},
73
- {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pasqua", :regions => [:it]},
74
- {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lunedì dell'Angelo", :regions => [:it]},
75
- {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Goede Vrijdag", :regions => [:nl]},
76
- {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pasen", :regions => [:nl]},
77
- {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Pasen", :regions => [:nl]},
78
- {:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Hemelvaartsdag", :regions => [:nl]},
79
- {:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pinksteren", :regions => [:nl]},
80
- {:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Pinksteren", :regions => [:nl]},
81
- {:function => lambda { |year| Holidays.easter(year)-47 }, :function_id => "easter(year)-47", :type => :informal, :name => "Carnaval", :regions => [:pt]},
82
- {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Sexta-feira Santa", :regions => [:pt]},
83
- {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Páscoa", :regions => [:pt]},
84
- {:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Corpo de Deus", :regions => [:pt]}],
85
- 11 => [{:mday => 10, :type => :informal, :name => "Mortensaften", :regions => [:dk]},
86
- {:mday => 1, :name => "Allerheiligen", :regions => [:de_bw, :de_by, :de_nw, :de_rp, :de_sl]},
87
- {:function => lambda { |year| Holidays.de_buss_und_bettag(year) }, :function_id => "de_buss_und_bettag(year)", :name => "Buß- und Bettag", :regions => [:de_by, :de_sn]},
88
- {:mday => 1, :name => "Todos los Santos", :regions => [:es]},
89
- {:mday => 1, :name => "Toussaint", :regions => [:fr]},
90
- {:mday => 11, :name => "Armistice 1918", :regions => [:fr]},
91
- {:mday => 5, :type => :informal, :name => "Guy Fawkes Day", :regions => [:gb]},
92
- {:mday => 16, :name => "Dagur íslenskrar tungu", :regions => [:is]},
93
- {:mday => 1, :name => "Ognissanti", :regions => [:it]},
94
- {:mday => 1, :name => "Todos os Santos", :regions => [:pt]}],
95
- 6 => [{:mday => 5, :name => "Grundlovsdag", :regions => [:dk]},
96
- {:mday => 15, :type => :informal, :name => "Valdemarsdag og Genforeningsdag", :regions => [:dk]},
97
- {:mday => 23, :type => :informal, :name => "Sankt Hans aften", :regions => [:dk]},
98
- {:mday => 9, :name => "Día de la Región de Murcia", :regions => [:es_mu]},
99
- {:mday => 9, :name => "Día de La Rioja", :regions => [:es_lo]},
100
- {:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:ie]},
101
- {:mday => 3, :type => :informal, :name => "Sjómannadagurinn", :regions => [:is]},
102
- {:mday => 17, :name => "Lýðveldisdagurinn", :regions => [:is]},
103
- {:mday => 2, :name => "Festa della Repubblica", :regions => [:it]},
104
- {:mday => 10, :name => "Dia de Portugal", :regions => [:pt]}],
105
- 1 => [{:mday => 1, :name => "Nytårsdag", :regions => [:dk]},
106
- {:mday => 1, :name => "Neujahrstag", :regions => [:de]},
107
- {:mday => 6, :name => "Heilige Drei Könige", :regions => [:de_bw, :de_by]},
108
- {:mday => 1, :name => "Año Nuevo", :regions => [:es]},
109
- {:mday => 6, :name => "Día de Reyes", :regions => [:es]},
110
- {:mday => 1, :name => "Jour de l'an", :regions => [:fr]},
111
- {:mday => 1, :name => "New Year's Day", :regions => [:gb, :ie]},
112
- {:mday => 2, :name => "New Year's", :regions => [:gb_sct]},
113
- {:mday => 1, :name => "Nýársdagur", :regions => [:is]},
114
- {:mday => 6, :name => "Þrettándinn", :regions => [:is]},
115
- {:mday => 19, :type => :informal, :name => "Bóndadagur", :regions => [:is]},
116
- {:mday => 1, :name => "Capodanno", :regions => [:it]},
117
- {:mday => 6, :name => "Epifania", :regions => [:it]},
118
- {:mday => 1, :name => "Nieuwjaar", :regions => [:nl]},
119
- {:mday => 1, :name => "Ano Novo", :regions => [:pt]}],
120
- 12 => [{:mday => 13, :type => :informal, :name => "Sankt Lucia", :regions => [:dk]},
121
- {:mday => 24, :name => "Juleaftensdag", :regions => [:dk]},
122
- {:mday => 25, :name => "1. juledag", :regions => [:dk]},
123
- {:mday => 26, :name => "2. juledag", :regions => [:dk]},
124
- {:mday => 25, :name => "1. Weihnachtstag", :regions => [:de]},
125
- {:mday => 26, :name => "2. Weihnachtstag", :regions => [:de]},
126
- {:mday => 6, :name => "Día de la Constitución", :regions => [:es]},
127
- {:mday => 8, :name => "Inmaculada Concepción", :regions => [:es]},
128
- {:mday => 25, :name => "Navidad del Señor", :regions => [:es]},
129
- {:mday => 26, :name => "San Esteban", :regions => [:es_ib, :es_ct]},
130
- {:mday => 25, :name => "Nöel", :regions => [:fr]},
131
- {:mday => 25, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "Christmas Day", :regions => [:gb]},
132
- {:mday => 26, :observed => lambda { |date| Holidays.to_weekday_if_boxing_weekend(date) }, :observed_id => "to_weekday_if_boxing_weekend", :name => "Boxing Day", :regions => [:gb]},
133
- {:mday => 25, :name => "Christmas Day", :regions => [:ie]},
134
- {:mday => 26, :name => "St. Stephen's Day", :regions => [:ie]},
135
- {:mday => 24, :name => "Jól", :regions => [:is]},
136
- {:mday => 25, :name => "Jól", :regions => [:is]},
137
- {:mday => 26, :name => "Jól", :regions => [:is]},
138
- {:mday => 31, :name => "Gamlárskvöld", :regions => [:is]},
139
- {:mday => 8, :name => "Immacolata Concezione", :regions => [:it]},
140
- {:mday => 25, :name => "Natale", :regions => [:it]},
141
- {:mday => 26, :name => "Santo Stefano", :regions => [:it]},
142
- {:mday => 5, :type => :informal, :name => "Sinterklaas", :regions => [:nl]},
143
- {:mday => 25, :name => "Kerstmis", :regions => [:nl]},
144
- {:mday => 26, :name => "Kerstmis", :regions => [:nl]},
145
- {:mday => 1, :name => "Restauração da Independência", :regions => [:pt]},
146
- {:mday => 8, :name => "Imaculada Conceição", :regions => [:pt]},
147
- {:mday => 25, :name => "Natal", :regions => [:pt]}],
148
- 7 => [{:mday => 23, :name => "Santiago Apostol", :regions => [:es_ga]},
149
- {:mday => 14, :name => "Fête nationale", :regions => [:fr]},
150
- {:mday => 5, :name => "Tynwald Day", :regions => [:im, :gb_iom]},
151
- {:mday => 12, :name => "Battle of the Boyne", :regions => [:gb_nir]}],
152
- 2 => [{:mday => 28, :name => "Día de Andalucía", :regions => [:es_an]},
153
- {:mday => 18, :type => :informal, :name => "Konudagur", :regions => [:is]}],
154
- 8 => [{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:de_by, :de_sl]},
155
- {:mday => 15, :name => "Asunción", :regions => [:es]},
156
- {:mday => 15, :name => "Assomption", :regions => [:fr]},
157
- {:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:gb_sct, :ie]},
158
- {:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir]},
159
- {:wday => 1, :week => 1, :name => "Frídagur verslunarmanna", :regions => [:is]},
160
- {:mday => 15, :name => "Assunzione", :regions => [:it]},
161
- {:mday => 15, :name => "Assunção de Nossa Senhora", :regions => [:pt]}],
162
- 3 => [{:mday => 1, :name => "Día de las Islas Baleares", :regions => [:es_ib]},
163
- {:mday => 19, :name => "San José", :regions => [:es_v, :es_vc, :es_cm, :es_mu, :es_m]},
164
- {:mday => 5, :name => "St. Piran's Day", :regions => [:gb_con]},
165
- {:mday => 17, :name => "St. Patrick's Day", :regions => [:gb_nir, :ie]}],
166
- 9 => [{:mday => 2, :name => "Día de Ceuta", :regions => [:es_ce]},
167
- {:mday => 8, :name => "Día de Asturias", :regions => [:es_o]},
168
- {:mday => 8, :name => "Día de Extremadura", :regions => [:es_ex]},
169
- {:mday => 11, :name => "Fiesta Nacional de Cataluña", :regions => [:es_ct]}],
170
- 4 => [{:mday => 1, :type => :informal, :name => "1. april", :regions => [:dk]},
171
- {:mday => 9, :type => :informal, :name => "Danmarks besættelse", :regions => [:dk]},
172
- {:mday => 16, :type => :informal, :name => "Dronningens fødselsdag", :regions => [:dk]},
173
- {:mday => 23, :name => "San Jorge", :regions => [:es_ar, :es_cl]},
174
- {:mday => 23, :name => "Día de Aragón", :regions => [:es_ar]},
175
- {:function => lambda { |year| Holidays.is_sumardagurinn_fyrsti(year) }, :function_id => "is_sumardagurinn_fyrsti(year)", :name => "Sumardagurinn fyrsti", :regions => [:is]},
176
- {:mday => 25, :name => "Festa della Liberazione", :regions => [:it]},
177
- {:mday => 30, :name => "Koninginnedag", :regions => [:nl]},
178
- {:mday => 25, :name => "Dia da Liberdade", :regions => [:pt]}],
179
- 10 => [{:mday => 3, :name => "Tag der Deutschen Einheit", :regions => [:de]},
180
- {:mday => 31, :name => "Reformationstag", :regions => [:de_bb, :de_mv, :de_sn, :de_st, :de_th]},
181
- {:mday => 9, :name => "Día de Valencia", :regions => [:es_vc, :es_v]},
182
- {:mday => 12, :name => "Día de la Hispanidad", :regions => [:es]},
183
- {:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:ie]},
184
- {:mday => 5, :name => "Implantação da República", :regions => [:pt]}]
185
- }
186
- end
187
-
188
- # Germany: Wednesday before November 23
189
- def self.de_buss_und_bettag(year)
190
- date = Date.civil(year,11,23)
191
- if date.wday > 3
192
- date -= (date.wday - 3)
193
- else
194
- date -= (date.wday + 4)
195
- end
196
- date
197
- end
198
-
199
-
200
- # Iceland: first day of summer (Thursday after 18 April)
201
- def self.is_sumardagurinn_fyrsti(year)
202
- date = Date.civil(year,4,18)
203
- if date.wday < 4
204
- date += (4 - date.wday)
205
- else date
206
- date += (11 - date.wday)
207
- end
208
- date
209
- end
210
-
211
-
212
-
213
- end
214
-
215
- Holidays.merge_defs(Holidays::Europe::DEFINED_REGIONS, Holidays::Europe::HOLIDAYS_BY_MONTH)
1
+ # encoding: utf-8
2
+ module Holidays
3
+ # This file is generated by the Ruby Holiday gem.
4
+ #
5
+ # Definitions loaded: data/cz.yaml, data/dk.yaml, data/de.yaml, data/es.yaml, data/fr.yaml, data/gb.yaml, data/ie.yaml, data/is.yaml, data/it.yaml, data/nl.yaml, data/no.yaml, data/pt.yaml
6
+ #
7
+ # To use the definitions in this file, load them right after you load the
8
+ # Holiday gem:
9
+ #
10
+ # require 'holidays'
11
+ # require 'holidays/europe'
12
+ #
13
+ # More definitions are available at http://code.dunae.ca/holidays.
14
+ module Europe # :nodoc:
15
+ DEFINED_REGIONS = [:cz, :dk, :no, :de, :de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl, :de_st, :de_bb, :de_mv, :de_sn, :de_th, :es_pv, :es_ct, :es_na, :es_v, :es_vc, :es, :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, :fr, :gb, :gb_eng, :gb_wls, :gb_eaw, :gb_nir, :ie, :gb_sct, :gb_con, :je, :gb_jsy, :gg, :gb_gsy, :im, :gb_iom, :is, :it, :nl, :pt]
16
+
17
+ HOLIDAYS_BY_MONTH = {
18
+ 0 => [{:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Velikonoční pondělí", :regions => [:cz]},
19
+ {:function => lambda { |year| Holidays.easter(year)-49 }, :function_id => "easter(year)-49", :type => :informal, :name => "Fastelavn", :regions => [:dk, :no]},
20
+ {:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Palmesøndag", :regions => [:dk, :no]},
21
+ {:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skærtorsdag", :regions => [:dk]},
22
+ {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Langfredag", :regions => [:dk, :no]},
23
+ {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Påskedag", :regions => [:dk]},
24
+ {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "2. påskedag", :regions => [:dk, :no]},
25
+ {:function => lambda { |year| Holidays.easter(year)+26 }, :function_id => "easter(year)+26", :name => "Store Bededag", :regions => [:dk]},
26
+ {:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Kristi Himmelfartsdag", :regions => [:dk, :no]},
27
+ {:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pinsedag", :regions => [:dk]},
28
+ {:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "2. Pinsedag", :regions => [:dk]},
29
+ {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Karfreitag", :regions => [:de]},
30
+ {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Ostermontag", :regions => [:de]},
31
+ {:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Christi Himmelfahrt", :regions => [:de]},
32
+ {:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Pfingstmontag", :regions => [:de]},
33
+ {:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Fronleichnam", :regions => [:de_bw, :de_by, :de_he, :de_nw, :de_rp, :de_sl]},
34
+ {:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Jueves Santo", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]},
35
+ {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Viernes Santo", :regions => [:es]},
36
+ {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lunes de Pascua", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]},
37
+ {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pâques", :regions => [:fr]},
38
+ {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lundi de Pâques", :regions => [:fr]},
39
+ {:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Ascension", :regions => [:fr]},
40
+ {:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pentecôte", :regions => [:fr]},
41
+ {:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Lundi de Pentecôte", :regions => [:fr]},
42
+ {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Good Friday", :regions => [:gb]},
43
+ {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Easter Sunday", :regions => [:gb]},
44
+ {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Easter Monday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir, :ie]},
45
+ {:function => lambda { |year| Holidays.easter(year)-48 }, :function_id => "easter(year)-48", :name => "Bolludagur", :regions => [:is]},
46
+ {:function => lambda { |year| Holidays.easter(year)-47 }, :function_id => "easter(year)-47", :name => "Sprengidagur", :regions => [:is]},
47
+ {:function => lambda { |year| Holidays.easter(year)-46 }, :function_id => "easter(year)-46", :name => "Öskudagur", :regions => [:is]},
48
+ {:function => lambda { |year| Holidays.easter(year)-7 }, :function_id => "easter(year)-7", :name => "Pálmasunnudagur", :regions => [:is]},
49
+ {:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skírdagur", :regions => [:is]},
50
+ {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Föstudaginn langi", :regions => [:is]},
51
+ {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Páskadagur", :regions => [:is]},
52
+ {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Annar í páskum", :regions => [:is]},
53
+ {:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Uppstigningardagur", :regions => [:is]},
54
+ {:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Hvítasunnudagur", :regions => [:is]},
55
+ {:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Annar í hvítasunnu", :regions => [:is]},
56
+ {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pasqua", :regions => [:it]},
57
+ {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Lunedì dell'Angelo", :regions => [:it]},
58
+ {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Goede Vrijdag", :regions => [:nl]},
59
+ {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Pasen", :regions => [:nl]},
60
+ {:function => lambda { |year| Holidays.easter(year)+1 }, :function_id => "easter(year)+1", :name => "Pasen", :regions => [:nl]},
61
+ {:function => lambda { |year| Holidays.easter(year)+39 }, :function_id => "easter(year)+39", :name => "Hemelvaartsdag", :regions => [:nl]},
62
+ {:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "Pinksteren", :regions => [:nl]},
63
+ {:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "Pinksteren", :regions => [:nl]},
64
+ {:function => lambda { |year| Holidays.easter(year)-3 }, :function_id => "easter(year)-3", :name => "Skjærtorsdag", :regions => [:no]},
65
+ {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "1. påskedag", :regions => [:no]},
66
+ {:function => lambda { |year| Holidays.easter(year)+49 }, :function_id => "easter(year)+49", :name => "1. pinsedag", :regions => [:no]},
67
+ {:function => lambda { |year| Holidays.easter(year)+50 }, :function_id => "easter(year)+50", :name => "2. pinsedag", :regions => [:no]},
68
+ {:function => lambda { |year| Holidays.easter(year)-47 }, :function_id => "easter(year)-47", :type => :informal, :name => "Carnaval", :regions => [:pt]},
69
+ {:function => lambda { |year| Holidays.easter(year)-2 }, :function_id => "easter(year)-2", :name => "Sexta-feira Santa", :regions => [:pt]},
70
+ {:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "Páscoa", :regions => [:pt]},
71
+ {:function => lambda { |year| Holidays.easter(year)+60 }, :function_id => "easter(year)+60", :name => "Corpo de Deus", :regions => [:pt]}],
72
+ 1 => [{:mday => 1, :name => "Den obnovy samostatného českého státu", :regions => [:cz]},
73
+ {:mday => 1, :name => "Nytårsdag", :regions => [:dk]},
74
+ {:mday => 1, :name => "Neujahrstag", :regions => [:de]},
75
+ {:mday => 6, :name => "Heilige Drei Könige", :regions => [:de_bw, :de_by, :de_st]},
76
+ {:mday => 1, :name => "Año Nuevo", :regions => [:es]},
77
+ {:mday => 6, :name => "Día de Reyes", :regions => [:es]},
78
+ {:mday => 1, :name => "Jour de l'an", :regions => [:fr]},
79
+ {:mday => 1, :name => "New Year's Day", :regions => [:gb, :ie]},
80
+ {:mday => 2, :name => "New Year's", :regions => [:gb_sct]},
81
+ {:mday => 1, :name => "Nýársdagur", :regions => [:is]},
82
+ {:mday => 6, :name => "Þrettándinn", :regions => [:is]},
83
+ {:mday => 19, :type => :informal, :name => "Bóndadagur", :regions => [:is]},
84
+ {:mday => 1, :name => "Capodanno", :regions => [:it]},
85
+ {:mday => 6, :name => "Epifania", :regions => [:it]},
86
+ {:mday => 1, :name => "Nieuwjaar", :regions => [:nl]},
87
+ {:mday => 1, :name => "Nyttårsdag", :regions => [:no]},
88
+ {:mday => 1, :name => "Ano Novo", :regions => [:pt]}],
89
+ 5 => [{:mday => 1, :name => "Svátek práce", :regions => [:cz]},
90
+ {:mday => 8, :name => "Den vítězství", :regions => [:cz]},
91
+ {:mday => 1, :name => "Arbejdernes kampdag", :regions => [:dk]},
92
+ {:mday => 5, :type => :informal, :name => "Danmarks befrielse", :regions => [:dk]},
93
+ {:mday => 1, :name => "Tag der Arbeit", :regions => [:de]},
94
+ {:mday => 1, :name => "Día del Trabajador", :regions => [:es]},
95
+ {:mday => 2, :name => "Fiesta de la Comunidad", :regions => [:es_m]},
96
+ {:mday => 30, :name => "Día de las Canarias", :regions => [:es_cn]},
97
+ {:mday => 31, :name => "Día de la Región Castilla-La Mancha", :regions => [:es_cm]},
98
+ {:mday => 1, :name => "Fête du travail", :regions => [:fr]},
99
+ {:mday => 8, :name => "Victoire 1945", :regions => [:fr]},
100
+ {:wday => 1, :week => 1, :name => "May Day", :regions => [:gb, :ie]},
101
+ {:mday => 9, :name => "Liberation Day", :regions => [:je, :gb_jsy, :gg, :gb_gsy]},
102
+ {:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb]},
103
+ {:mday => 1, :name => "Verkalýðsdagurinn", :regions => [:is]},
104
+ {:mday => 13, :name => "Mæðradagurinn", :regions => [:is]},
105
+ {:mday => 1, :name => "Festa dei Lavoratori", :regions => [:it]},
106
+ {:mday => 4, :name => "Dodenherdenking", :regions => [:nl]},
107
+ {:mday => 5, :name => "Bevrijdingsdag", :regions => [:nl]},
108
+ {:mday => 1, :name => "1. mai", :regions => [:no]},
109
+ {:mday => 17, :name => "17. mai", :regions => [:no]},
110
+ {:mday => 1, :name => "Dia do Trabalhador", :regions => [:pt]}],
111
+ 7 => [{:mday => 5, :name => "Den slovanských věrozvěstů Cyrila a Metoděje", :regions => [:cz]},
112
+ {:mday => 6, :name => "Den upálení mistra Jana Husa", :regions => [:cz]},
113
+ {:mday => 23, :name => "Santiago Apostol", :regions => [:es_ga]},
114
+ {:mday => 14, :name => "Fête nationale", :regions => [:fr]},
115
+ {:mday => 5, :name => "Tynwald Day", :regions => [:im, :gb_iom]},
116
+ {:mday => 12, :name => "Battle of the Boyne", :regions => [:gb_nir]}],
117
+ 9 => [{:mday => 28, :name => "Den české státnosti", :regions => [:cz]},
118
+ {:mday => 2, :name => "Día de Ceuta", :regions => [:es_ce]},
119
+ {:mday => 8, :name => "Día de Asturias", :regions => [:es_o]},
120
+ {:mday => 8, :name => "Día de Extremadura", :regions => [:es_ex]},
121
+ {:mday => 11, :name => "Fiesta Nacional de Cataluña", :regions => [:es_ct]}],
122
+ 10 => [{:mday => 28, :name => "Den vzniku samostatného československého státu", :regions => [:cz]},
123
+ {:mday => 3, :name => "Tag der Deutschen Einheit", :regions => [:de]},
124
+ {:mday => 31, :name => "Reformationstag", :regions => [:de_bb, :de_mv, :de_sn, :de_st, :de_th]},
125
+ {:mday => 9, :name => "Día de Valencia", :regions => [:es_vc, :es_v]},
126
+ {:mday => 12, :name => "Día de la Hispanidad", :regions => [:es]},
127
+ {:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:ie]},
128
+ {:mday => 5, :name => "Implantação da República", :regions => [:pt]}],
129
+ 11 => [{:mday => 17, :name => "Den boje za svobodu a demokracii", :regions => [:cz]},
130
+ {:mday => 10, :type => :informal, :name => "Mortensaften", :regions => [:dk]},
131
+ {:mday => 1, :name => "Allerheiligen", :regions => [:de_bw, :de_by, :de_nw, :de_rp, :de_sl]},
132
+ {:function => lambda { |year| Holidays.de_buss_und_bettag(year) }, :function_id => "de_buss_und_bettag(year)", :name => "Buß- und Bettag", :regions => [:de_sn]},
133
+ {:mday => 1, :name => "Todos los Santos", :regions => [:es]},
134
+ {:mday => 1, :name => "Toussaint", :regions => [:fr]},
135
+ {:mday => 11, :name => "Armistice 1918", :regions => [:fr]},
136
+ {:mday => 5, :type => :informal, :name => "Guy Fawkes Day", :regions => [:gb]},
137
+ {:mday => 16, :name => "Dagur íslenskrar tungu", :regions => [:is]},
138
+ {:mday => 1, :name => "Ognissanti", :regions => [:it]},
139
+ {:mday => 1, :name => "Todos os Santos", :regions => [:pt]}],
140
+ 12 => [{:mday => 24, :name => "Štědrý den", :regions => [:cz]},
141
+ {:mday => 25, :name => "1. svátek vánoční", :regions => [:cz]},
142
+ {:mday => 26, :name => "2. svátek vánoční", :regions => [:cz]},
143
+ {:mday => 13, :type => :informal, :name => "Sankt Lucia", :regions => [:dk]},
144
+ {:mday => 24, :name => "Juleaftensdag", :regions => [:dk]},
145
+ {:mday => 25, :name => "1. juledag", :regions => [:dk, :no]},
146
+ {:mday => 26, :name => "2. juledag", :regions => [:dk, :no]},
147
+ {:mday => 25, :name => "1. Weihnachtstag", :regions => [:de]},
148
+ {:mday => 26, :name => "2. Weihnachtstag", :regions => [:de]},
149
+ {:mday => 6, :name => "Día de la Constitución", :regions => [:es]},
150
+ {:mday => 8, :name => "Inmaculada Concepción", :regions => [:es]},
151
+ {:mday => 25, :name => "Navidad del Señor", :regions => [:es]},
152
+ {:mday => 26, :name => "San Esteban", :regions => [:es_ib, :es_ct]},
153
+ {:mday => 25, :name => "Nöel", :regions => [:fr]},
154
+ {:mday => 25, :observed => lambda { |date| Holidays.to_monday_if_weekend(date) }, :observed_id => "to_monday_if_weekend", :name => "Christmas Day", :regions => [:gb]},
155
+ {:mday => 26, :observed => lambda { |date| Holidays.to_weekday_if_boxing_weekend(date) }, :observed_id => "to_weekday_if_boxing_weekend", :name => "Boxing Day", :regions => [:gb]},
156
+ {:mday => 25, :name => "Christmas Day", :regions => [:ie]},
157
+ {:mday => 26, :name => "St. Stephen's Day", :regions => [:ie]},
158
+ {:mday => 24, :name => "Jól", :regions => [:is]},
159
+ {:mday => 25, :name => "Jól", :regions => [:is]},
160
+ {:mday => 26, :name => "Jól", :regions => [:is]},
161
+ {:mday => 31, :name => "Gamlárskvöld", :regions => [:is]},
162
+ {:mday => 8, :name => "Immacolata Concezione", :regions => [:it]},
163
+ {:mday => 25, :name => "Natale", :regions => [:it]},
164
+ {:mday => 26, :name => "Santo Stefano", :regions => [:it]},
165
+ {:mday => 5, :type => :informal, :name => "Sinterklaas", :regions => [:nl]},
166
+ {:mday => 25, :name => "Kerstmis", :regions => [:nl]},
167
+ {:mday => 26, :name => "Kerstmis", :regions => [:nl]},
168
+ {:mday => 24, :type => :informal, :name => "Julaften", :regions => [:no]},
169
+ {:mday => 31, :type => :informal, :name => "Nyttårsaften", :regions => [:no]},
170
+ {:mday => 1, :name => "Restauração da Independência", :regions => [:pt]},
171
+ {:mday => 8, :name => "Imaculada Conceição", :regions => [:pt]},
172
+ {:mday => 25, :name => "Natal", :regions => [:pt]}],
173
+ 4 => [{:mday => 1, :type => :informal, :name => "1. april", :regions => [:dk]},
174
+ {:mday => 9, :type => :informal, :name => "Danmarks besættelse", :regions => [:dk]},
175
+ {:mday => 16, :type => :informal, :name => "Dronningens fødselsdag", :regions => [:dk]},
176
+ {:mday => 23, :name => "San Jorge", :regions => [:es_ar, :es_cl]},
177
+ {:mday => 23, :name => "Día de Aragón", :regions => [:es_ar]},
178
+ {:function => lambda { |year| Holidays.is_sumardagurinn_fyrsti(year) }, :function_id => "is_sumardagurinn_fyrsti(year)", :name => "Sumardagurinn fyrsti", :regions => [:is]},
179
+ {:mday => 25, :name => "Festa della Liberazione", :regions => [:it]},
180
+ {:mday => 30, :name => "Koninginnedag", :regions => [:nl]},
181
+ {:mday => 25, :name => "Dia da Liberdade", :regions => [:pt]}],
182
+ 6 => [{:mday => 5, :name => "Grundlovsdag", :regions => [:dk]},
183
+ {:mday => 15, :type => :informal, :name => "Valdemarsdag og Genforeningsdag", :regions => [:dk]},
184
+ {:mday => 23, :type => :informal, :name => "Sankt Hans aften", :regions => [:dk]},
185
+ {:mday => 9, :name => "Día de la Región de Murcia", :regions => [:es_mu]},
186
+ {:mday => 9, :name => "Día de La Rioja", :regions => [:es_lo]},
187
+ {:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:ie]},
188
+ {:mday => 3, :type => :informal, :name => "Sjómannadagurinn", :regions => [:is]},
189
+ {:mday => 17, :name => "Lýðveldisdagurinn", :regions => [:is]},
190
+ {:mday => 2, :name => "Festa della Repubblica", :regions => [:it]},
191
+ {:mday => 10, :name => "Dia de Portugal", :regions => [:pt]}],
192
+ 8 => [{:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:de_by, :de_sl]},
193
+ {:mday => 15, :name => "Asunción", :regions => [:es]},
194
+ {:mday => 15, :name => "Assomption", :regions => [:fr]},
195
+ {:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:gb_sct, :ie]},
196
+ {:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir]},
197
+ {:wday => 1, :week => 1, :name => "Frídagur verslunarmanna", :regions => [:is]},
198
+ {:mday => 15, :name => "Assunzione", :regions => [:it]},
199
+ {:mday => 15, :name => "Assunção de Nossa Senhora", :regions => [:pt]}],
200
+ 2 => [{:mday => 28, :name => "Día de Andalucía", :regions => [:es_an]},
201
+ {:mday => 18, :type => :informal, :name => "Konudagur", :regions => [:is]}],
202
+ 3 => [{:mday => 1, :name => "Día de las Islas Baleares", :regions => [:es_ib]},
203
+ {:mday => 19, :name => "San José", :regions => [:es_v, :es_vc, :es_cm, :es_mu, :es_m]},
204
+ {:mday => 5, :name => "St. Piran's Day", :regions => [:gb_con]},
205
+ {:mday => 17, :name => "St. Patrick's Day", :regions => [:gb_nir, :ie]}]
206
+ }
207
+ end
208
+
209
+ # Germany: Wednesday before November 23
210
+ def self.de_buss_und_bettag(year)
211
+ date = Date.civil(year,11,23)
212
+ if date.wday > 3
213
+ date -= (date.wday - 3)
214
+ else
215
+ date -= (date.wday + 4)
216
+ end
217
+ date
218
+ end
219
+
220
+
221
+ # Iceland: first day of summer (Thursday after 18 April)
222
+ def self.is_sumardagurinn_fyrsti(year)
223
+ date = Date.civil(year,4,18)
224
+ if date.wday < 4
225
+ date += (4 - date.wday)
226
+ else date
227
+ date += (11 - date.wday)
228
+ end
229
+ date
230
+ end
231
+
232
+
233
+
234
+ end
235
+
236
+ Holidays.merge_defs(Holidays::Europe::DEFINED_REGIONS, Holidays::Europe::HOLIDAYS_BY_MONTH)