This repository has been archived by the owner on Jun 23, 2020. It is now read-only.
forked from holidays/definitions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
de.yaml
367 lines (365 loc) · 9 KB
/
de.yaml
1
2
3
4
5
6
7
8
9
10
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
# German holiday definitions for the Ruby Holiday gem.
#
# Updated: 2019-02-10
#
# Changes 2016-11-27:
# - Change de_sn_aux, de_th_aux to de_sn_sorbian (because it only is celebrated in Sorbian regions in Sachsen) and de_th_eichsfeld, to reflect region of Eichsfeld
# - Change de_sn_aux to de_by_augsburg to reflect only City of Augsburg
#
# Changes 2017-06-08:
# - Add Berlin, Bremen, Hamburg, Niedersachsen, Schleswig-Holstein
# - Change de_th_eichsfeld to de_th_cath because it affects the catholic communities Eichsfeld, Unstrut-Hainich-Kreis and Wartburgkreis
# - Merge Fronleichnam entry
# - Add de_by_cath for catholic communities in Bavaria; Maria Himmelfahrt is not a Bavaria-wide holiday
# - Mariä Himmelfahrt is celebrated in the community of Augsburg (de_by_augsburg)
# - Enhance tests
#
# Changes 2017-09-25:
# - Correct definition for Reformation Day
#
# Changes 2018-09-10:
# - Reformation Day has been added as a new holiday in Bremen, Hamburg, Lower Saxony and Schleswig-Holstein, starting in 2018.
#
# Change 2019-02-10:
# - Changing usage of 'year_ranges.after' to 'year_ranges.from', see https://github.com/holidays/definitions/issues/117
#
# Sources:
# - http://en.wikipedia.org/wiki/Holidays_in_Germany
# - http://www.timeanddate.com/calendar/index.html?country=8
# - http://www.germany.info/relaunch/welcome/travel/holidays.html
# - https://www.statistik.bayern.de/statistik/bevoelkerungsstand/00141.php
# - http://www.thueringen.de/mam/th3/tim/verwaltungsrecht/fronleichnam_gemeindeschluesselzahlen.pdf
---
months:
0:
- name: Karfreitag
regions: [de]
function: easter(year)
function_modifier: -2
- name: Ostersonntag
regions: [de]
function: easter(year)
type: informal
- name: Ostermontag
regions: [de]
function: easter(year)
function_modifier: 1
- name: Christi Himmelfahrt
regions: [de]
function: easter(year)
function_modifier: 39
- name: Pfingstsonntag
regions: [de]
function: easter(year)
function_modifier: 49
type: informal
- name: Pfingstmontag
regions: [de]
function: easter(year)
function_modifier: 50
- name: Fronleichnam
regions: [de_bw, de_by, de_he, de_nw, de_rp, de_sl, de_sn_sorbian, de_th_cath]
function: easter(year)
function_modifier: 60
- name: Weiberfastnacht
regions: [de_bw, de_by, de_he, de_nw, de_rp, de_sl, de_sn]
function: easter(year)
function_modifier: -52
type: informal
- name: Rosenmontag
regions: [de_bw, de_by, de_he, de_nw, de_rp, de_sl, de_sn]
function: easter(year)
function_modifier: -48
type: informal
- name: Aschermittwoch
regions: [de_bw, de_by, de_he, de_nw, de_rp, de_sl, de_sn]
function: easter(year)
function_modifier: -46
type: informal
1:
- name: Neujahrstag
regions: [de]
mday: 1
- name: Heilige Drei Könige
regions: [de_bw, de_by, de_st]
mday: 6
3:
- name: Internationaler Frauentag
regions: [de_be]
mday: 8
year_ranges:
from: 2019
5:
- name: Tag der Arbeit
regions: [de]
mday: 1
- name: Tag der Befreiung
regions: [de_be]
mday: 8
year_ranges:
limited: [2020]
8:
- name: Mariä Himmelfahrt
regions: [de_by_cath, de_by_augsburg, de_sl]
mday: 15
- name: Friedensfest
regions: [de_by_augsburg]
mday: 8
10:
- name: Tag der Deutschen Einheit
regions: [de]
mday: 3
- name: Reformationstag
regions: [de_bb, de_mv, de_sn, de_st, de_th]
mday: 31
- name: Reformationstag
regions: [de_bw]
mday: 31
type: informal
- name: Reformationstag
regions: [de]
mday: 31
year_ranges:
limited: [2017]
- name: Reformationstag
regions: [de_hb, de_hh, de_ni, de_sh]
mday: 31
year_ranges:
from: 2018
11:
- name: Allerheiligen
regions: [de_bw, de_by, de_nw, de_rp, de_sl]
mday: 1
- name: Buß- und Bettag
regions: [de_sn]
function: de_buss_und_bettag(year)
12:
- name: Heilig Abend
regions: [de]
mday: 24
type: informal
- name: 1. Weihnachtstag
regions: [de]
mday: 25
- name: 2. Weihnachtstag
regions: [de]
mday: 26
- name: Silvester
regions: [de]
mday: 31
type: informal
methods:
de_buss_und_bettag:
# Germany: Wednesday before November 23
arguments: year
ruby: |
date = Date.civil(year,11,23)
if date.wday > 3
date -= (date.wday - 3)
else
date -= (date.wday + 4)
end
date
tests:
- given:
date: '2009-01-01'
regions: ["de"]
options: ["informal"]
expect:
name: "Neujahrstag"
- given:
date: '2009-04-10'
regions: ["de"]
options: ["informal"]
expect:
name: "Karfreitag"
- given:
date: '2009-04-12'
regions: ["de"]
options: ["informal"]
expect:
name: "Ostersonntag"
- given:
date: '2009-04-13'
regions: ["de"]
options: ["informal"]
expect:
name: "Ostermontag"
- given:
date: '2009-05-01'
regions: ["de"]
options: ["informal"]
expect:
name: "Tag der Arbeit"
- given:
date: '2009-05-21'
regions: ["de"]
options: ["informal"]
expect:
name: "Christi Himmelfahrt"
- given:
date: '2009-05-31'
regions: ["de"]
options: ["informal"]
expect:
name: "Pfingstsonntag"
- given:
date: '2009-06-01'
regions: ["de"]
options: ["informal"]
expect:
name: "Pfingstmontag"
- given:
date: '2009-10-03'
regions: ["de"]
options: ["informal"]
expect:
name: "Tag der Deutschen Einheit"
- given:
date: '2009-12-24'
regions: ["de"]
options: ["informal"]
expect:
name: "Heilig Abend"
- given:
date: '2009-12-25'
regions: ["de"]
options: ["informal"]
expect:
name: "1. Weihnachtstag"
- given:
date: '2009-12-26'
regions: ["de"]
options: ["informal"]
expect:
name: "2. Weihnachtstag"
- given:
date: '2009-12-31'
regions: ["de"]
options: ["informal"]
expect:
name: "Silvester"
- given:
date: '2009-01-06'
regions: ["de_bw", "de_by", "de_st", "de_"]
expect:
name: "Heilige Drei Könige"
- given:
date: '2009-06-11'
regions: ["de_bw", "de_by", "de_he", "de_nw", "de_rp", "de_sl", "de_sn_sorbian", "de_th_cath"]
expect:
name: "Fronleichnam"
- given:
date: '2009-08-15'
regions: ["de_by", "de_sl", "de_"]
expect:
name: "Mariä Himmelfahrt"
- given:
date: '2009-10-31'
regions: ["de_bb", "de_mv", "de_sn", "de_st", "de_th", "de_"]
expect:
name: "Reformationstag"
- given:
date: '2009-10-31'
regions: ["de_bw"]
options: ["informal"]
expect:
name: "Reformationstag"
- given:
date: '2017-10-31'
regions: ["de"]
expect:
name: "Reformationstag"
- given:
date: '2016-10-31'
regions: ["de"]
expect:
holiday: false
- given:
date: '2018-10-31'
regions: ["de"]
expect:
holiday: false
- given:
date: '2018-10-31'
regions: ["de_bb", "de_hb", "de_hh", "de_mv", "de_ni", "de_sh", "de_sn", "de_st", "de_th"]
expect:
name: "Reformationstag"
- given:
date: '2009-11-01'
regions: ["de_bw", "de_by", "de_nw", "de_rp", "de_sl", "de_"]
expect:
name: "Allerheiligen"
- given:
date: '2015-08-08'
regions: ["de_by_augsburg"]
expect:
name: "Friedensfest"
- given:
date: '2015-08-08'
regions: ["de", "de_bw", "de_by", "de_bb", "de_he", "de_mv", "de_nw", "de_rp", "de_sl", "de_sn", "de_st", "de_th"]
expect:
holiday: false
- given:
date: '2010-05-08'
regions: ["de"]
expect:
holiday: false
- given:
date: '2010-08-08'
regions: ["de"]
expect:
holiday: false
- given:
date: '2004-11-17'
regions: ["de_sn"]
expect:
name: "Buß- und Bettag"
- given:
date: '2005-11-16'
regions: ["de_sn"]
expect:
name: "Buß- und Bettag"
- given:
date: '2006-11-22'
regions: ["de_sn"]
expect:
name: "Buß- und Bettag"
- given:
date: '2009-11-18'
regions: ["de_sn"]
expect:
name: "Buß- und Bettag"
- given:
date: '2016-02-04'
regions: ["de_bw", "de_by", "de_he", "de_nw", "de_rp", "de_sl", "de_sn"]
options: ["informal"]
expect:
name: "Weiberfastnacht"
- given:
date: '2016-02-08'
regions: ["de_bw", "de_by", "de_he", "de_nw", "de_rp", "de_sl", "de_sn"]
options: ["informal"]
expect:
name: "Rosenmontag"
- given:
date: '2016-02-10'
regions: ["de_bw", "de_by", "de_he", "de_nw", "de_rp", "de_sl", "de_sn"]
options: ["informal"]
expect:
name: "Aschermittwoch"
- given:
date: '2018-03-08'
regions: ["de_be"]
expect:
holiday: false
- given:
date: '2019-03-08'
regions: ["de_be"]
expect:
name: "Internationaler Frauentag"
- given:
date: '2020-05-08'
regions: ["de_be"]
expect:
name: "Tag der Befreiung"