holidays 0.9.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/CHANGELOG +7 -0
- data/{README → README.rdoc} +36 -39
- data/data/SYNTAX +1 -1
- data/data/au.yaml +110 -105
- data/data/build_defs.rb +4 -3
- data/data/ca.yaml +140 -140
- data/data/cz.yaml +68 -0
- data/data/de.yaml +12 -14
- data/data/dk.yaml +1 -1
- data/data/es.yaml +1 -1
- data/data/fr.yaml +1 -1
- data/data/gb.yaml +1 -1
- data/data/ie.yaml +1 -1
- data/data/index.yaml +7 -2
- data/data/is.yaml +1 -1
- data/data/it.yaml +1 -1
- data/data/mx.yaml +1 -1
- data/data/nl.yaml +1 -1
- data/data/no.yaml +82 -0
- data/data/nyse.yaml +1 -1
- data/data/nz.yaml +141 -0
- data/data/pt.yaml +1 -1
- data/data/se.yaml +1 -1
- data/data/united_nations.yaml +188 -188
- data/data/ups.yaml +55 -55
- data/data/us.yaml +80 -80
- data/data/za.yaml +1 -1
- data/holidays.gemspec +155 -0
- data/lib/holidays.rb +424 -403
- data/lib/holidays/MANIFEST +28 -25
- data/lib/holidays/au.rb +43 -41
- data/lib/holidays/ca.rb +69 -68
- data/lib/holidays/cz.rb +36 -0
- data/lib/holidays/de.rb +51 -52
- data/lib/holidays/dk.rb +48 -47
- data/lib/holidays/es.rb +53 -52
- data/lib/holidays/europe.rb +236 -215
- data/lib/holidays/fr.rb +37 -36
- data/lib/holidays/gb.rb +41 -40
- data/lib/holidays/ie.rb +33 -32
- data/lib/holidays/is.rb +62 -61
- data/lib/holidays/it.rb +36 -35
- data/lib/holidays/mx.rb +52 -51
- data/lib/holidays/nl.rb +37 -36
- data/lib/holidays/no.rb +40 -0
- data/lib/holidays/north_america.rb +108 -107
- data/lib/holidays/nyse.rb +33 -32
- data/lib/holidays/nz.rb +69 -0
- data/lib/holidays/pt.rb +38 -52
- data/lib/holidays/scandinavia.rb +124 -114
- data/lib/holidays/se.rb +53 -52
- data/lib/holidays/united_nations.rb +25 -24
- data/lib/holidays/ups.rb +32 -31
- data/lib/holidays/us.rb +49 -48
- data/lib/holidays/za.rb +36 -35
- data/rakefile.rb +105 -113
- data/test/defs/test_defs_au.rb +36 -36
- data/test/defs/test_defs_ca.rb +29 -29
- data/test/defs/test_defs_cz.rb +26 -0
- data/test/defs/test_defs_de.rb +51 -46
- data/test/defs/test_defs_dk.rb +30 -30
- data/test/defs/test_defs_es.rb +57 -57
- data/test/defs/test_defs_europe.rb +280 -240
- data/test/defs/test_defs_fr.rb +26 -26
- data/test/defs/test_defs_gb.rb +36 -36
- data/test/defs/test_defs_ie.rb +21 -21
- data/test/defs/test_defs_is.rb +33 -33
- data/test/defs/test_defs_it.rb +25 -25
- data/test/defs/test_defs_mx.rb +22 -22
- data/test/defs/test_defs_nl.rb +24 -24
- data/test/defs/test_defs_no.rb +29 -0
- data/test/defs/test_defs_north_america.rb +54 -54
- data/test/defs/test_defs_nyse.rb +22 -22
- data/test/defs/test_defs_nz.rb +22 -0
- data/test/defs/test_defs_pt.rb +32 -32
- data/test/defs/test_defs_scandinavia.rb +94 -75
- data/test/defs/test_defs_se.rb +32 -32
- data/test/defs/test_defs_ups.rb +21 -21
- data/test/defs/test_defs_us.rb +23 -23
- data/test/defs/test_defs_za.rb +25 -25
- data/test/test_date.rb +123 -0
- data/test/test_helper.rb +22 -0
- data/test/test_holidays.rb +128 -0
- data/test/test_multiple_regions.rb +24 -0
- metadata +126 -73
data/lib/holidays/es.rb
CHANGED
@@ -1,52 +1,53 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
# require 'holidays
|
11
|
-
#
|
12
|
-
#
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
{:
|
20
|
-
{:
|
21
|
-
|
22
|
-
{:
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
{:mday =>
|
31
|
-
{:mday =>
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
8 => [{:mday => 15, :name => "Asunción", :regions => [:es]}],
|
36
|
-
|
37
|
-
{:mday =>
|
38
|
-
|
39
|
-
{:mday =>
|
40
|
-
|
41
|
-
{:mday =>
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
{:mday =>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
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)
|
data/lib/holidays/europe.rb
CHANGED
@@ -1,215 +1,236 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
# require 'holidays
|
11
|
-
#
|
12
|
-
#
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
{:
|
20
|
-
{:
|
21
|
-
{:
|
22
|
-
{:
|
23
|
-
{:
|
24
|
-
{:
|
25
|
-
{:
|
26
|
-
{:
|
27
|
-
{:
|
28
|
-
{:
|
29
|
-
{:
|
30
|
-
{:
|
31
|
-
{:
|
32
|
-
{:
|
33
|
-
{:
|
34
|
-
{:
|
35
|
-
|
36
|
-
{:function => lambda { |year| Holidays.easter(year)
|
37
|
-
{:function => lambda { |year| Holidays.easter(year)
|
38
|
-
{:function => lambda { |year| Holidays.easter(year)
|
39
|
-
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "
|
40
|
-
{:function => lambda { |year| Holidays.easter(year)+
|
41
|
-
{:function => lambda { |year| Holidays.easter(year)+
|
42
|
-
{:function => lambda { |year| Holidays.easter(year)
|
43
|
-
{:function => lambda { |year| Holidays.easter(year)
|
44
|
-
{:function => lambda { |year| Holidays.easter(year)+
|
45
|
-
{:function => lambda { |year| Holidays.easter(year)-
|
46
|
-
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :
|
47
|
-
{:function => lambda { |year| Holidays.easter(year)
|
48
|
-
{:function => lambda { |year| Holidays.easter(year)
|
49
|
-
{:function => lambda { |year| Holidays.easter(year)
|
50
|
-
{:function => lambda { |year| Holidays.easter(year)
|
51
|
-
{:function => lambda { |year| Holidays.easter(year)
|
52
|
-
{:function => lambda { |year| Holidays.easter(year)
|
53
|
-
{:function => lambda { |year| Holidays.easter(year)+
|
54
|
-
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "
|
55
|
-
{:function => lambda { |year| Holidays.easter(year)+
|
56
|
-
{:function => lambda { |year| Holidays.easter(year)
|
57
|
-
{:function => lambda { |year| Holidays.easter(year)+
|
58
|
-
{:function => lambda { |year| Holidays.easter(year)
|
59
|
-
{:function => lambda { |year| Holidays.easter(year)
|
60
|
-
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "
|
61
|
-
{:function => lambda { |year| Holidays.easter(year)+
|
62
|
-
{:function => lambda { |year| Holidays.easter(year)
|
63
|
-
{:function => lambda { |year| Holidays.easter(year)
|
64
|
-
{:function => lambda { |year| Holidays.easter(year)-
|
65
|
-
{:function => lambda { |year| Holidays.easter(year)
|
66
|
-
{:function => lambda { |year| Holidays.easter(year)
|
67
|
-
{:function => lambda { |year| Holidays.easter(year)
|
68
|
-
{:function => lambda { |year| Holidays.easter(year) }, :function_id => "easter(year)", :name => "
|
69
|
-
{:function => lambda { |year| Holidays.easter(year)
|
70
|
-
{:function => lambda { |year| Holidays.easter(year)
|
71
|
-
{:function => lambda { |year| Holidays.easter(year)+
|
72
|
-
|
73
|
-
{:
|
74
|
-
{:
|
75
|
-
{:
|
76
|
-
{:
|
77
|
-
{:
|
78
|
-
{:
|
79
|
-
{:
|
80
|
-
{:
|
81
|
-
{:
|
82
|
-
{:
|
83
|
-
{:
|
84
|
-
{:
|
85
|
-
|
86
|
-
{:mday => 1, :name => "
|
87
|
-
{:
|
88
|
-
{:mday => 1, :name => "
|
89
|
-
|
90
|
-
{:mday =>
|
91
|
-
{:mday =>
|
92
|
-
{:mday =>
|
93
|
-
{:mday => 1, :name => "
|
94
|
-
{:mday => 1, :name => "
|
95
|
-
|
96
|
-
{:mday =>
|
97
|
-
{:mday =>
|
98
|
-
{:mday =>
|
99
|
-
{:mday =>
|
100
|
-
{:wday => 1, :week => 1, :name => "
|
101
|
-
{:mday =>
|
102
|
-
{:
|
103
|
-
{:mday =>
|
104
|
-
{:mday =>
|
105
|
-
|
106
|
-
{:mday =>
|
107
|
-
{:mday =>
|
108
|
-
{:mday => 1, :name => "
|
109
|
-
{:mday =>
|
110
|
-
{:mday => 1, :name => "
|
111
|
-
|
112
|
-
{:mday =>
|
113
|
-
{:mday =>
|
114
|
-
{:mday =>
|
115
|
-
{:mday =>
|
116
|
-
{:mday =>
|
117
|
-
|
118
|
-
{:mday =>
|
119
|
-
{:mday =>
|
120
|
-
|
121
|
-
{:mday =>
|
122
|
-
|
123
|
-
{:mday =>
|
124
|
-
{:mday =>
|
125
|
-
{:mday =>
|
126
|
-
{:mday =>
|
127
|
-
{:
|
128
|
-
{:mday =>
|
129
|
-
|
130
|
-
{:mday =>
|
131
|
-
{:mday =>
|
132
|
-
{:
|
133
|
-
{:mday =>
|
134
|
-
{:mday =>
|
135
|
-
{:mday =>
|
136
|
-
{:mday =>
|
137
|
-
{:mday =>
|
138
|
-
{:mday =>
|
139
|
-
{:mday =>
|
140
|
-
|
141
|
-
{:mday =>
|
142
|
-
{:mday =>
|
143
|
-
{:mday =>
|
144
|
-
{:mday =>
|
145
|
-
{:mday =>
|
146
|
-
{:mday =>
|
147
|
-
{:mday => 25, :name => "
|
148
|
-
|
149
|
-
{:mday =>
|
150
|
-
{:mday =>
|
151
|
-
{:mday =>
|
152
|
-
|
153
|
-
{:mday =>
|
154
|
-
|
155
|
-
{:mday =>
|
156
|
-
{:mday =>
|
157
|
-
{:
|
158
|
-
{:
|
159
|
-
{:
|
160
|
-
{:mday =>
|
161
|
-
{:mday =>
|
162
|
-
|
163
|
-
{:mday =>
|
164
|
-
{:mday =>
|
165
|
-
{:mday =>
|
166
|
-
|
167
|
-
{:mday =>
|
168
|
-
{:mday =>
|
169
|
-
{:mday =>
|
170
|
-
|
171
|
-
{:mday =>
|
172
|
-
{:mday =>
|
173
|
-
|
174
|
-
{:mday =>
|
175
|
-
{:
|
176
|
-
{:mday =>
|
177
|
-
{:mday =>
|
178
|
-
{:
|
179
|
-
|
180
|
-
{:mday =>
|
181
|
-
{:mday =>
|
182
|
-
|
183
|
-
{:
|
184
|
-
{:mday =>
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
end
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
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)
|