-
Notifications
You must be signed in to change notification settings - Fork 138
/
Copy pathdk.yaml
130 lines (130 loc) · 3.16 KB
/
dk.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
# Danish holiday definitions for the Ruby Holiday gem.
#
# Updated: 2008-11-22.
# Sources:
# - http://en.wikipedia.org/wiki/Holidays_in_Denmark
# - http://www.amblondon.um.dk/en/menu/AboutDenmark/PublicHolidaysInDK/PublicHolidaysinDenmark-until2010.htm
# - http://borger.dk/forside/kirke-og-tro/folkekirken/officielle-helligdage
---
months:
0:
- name: Fastelavn
regions: [dk]
function: easter(year)
function_modifier: -49
type: informal
- name: Palmesøndag
regions: [dk]
function: easter(year)
function_modifier: -7
type: informal
- name: Skærtorsdag
regions: [dk]
function: easter(year)
function_modifier: -3
- name: Langfredag
regions: [dk]
function: easter(year)
function_modifier: -2
- name: Påskedag
regions: [dk]
function: easter(year)
- name: 2. påskedag
regions: [dk]
function: easter(year)
function_modifier: 1
- name: Store Bededag
regions: [dk]
function: easter(year)
function_modifier: 26
- name: Kristi Himmelfartsdag
regions: [dk]
function: easter(year)
function_modifier: 39
- name: Pinsedag
regions: [dk]
function: easter(year)
function_modifier: 49
- name: 2. Pinsedag
regions: [dk]
function: easter(year)
function_modifier: 50
1:
- name: Nytårsdag
regions: [dk]
mday: 1
4:
- name: 1. april
regions: [dk]
mday: 1
type: informal
- name: Danmarks besættelse
regions: [dk]
mday: 9
type: informal
- name: Dronningens fødselsdag
regions: [dk]
mday: 16
type: informal
5:
- name: Arbejdernes kampdag
regions: [dk]
mday: 1
type: informal
- name: Danmarks befrielse
regions: [dk]
mday: 5
type: informal
6:
- name: Grundlovsdag
regions: [dk]
mday: 5
type: informal
- name: Valdemarsdag og Genforeningsdag
regions: [dk]
mday: 15
type: informal
- name: Sankt Hans aften
regions: [dk]
mday: 23
type: informal
11:
- name: Mortensaften
regions: [dk]
mday: 10
type: informal
12:
- name: Sankt Lucia
regions: [dk]
mday: 13
type: informal
- name: Juleaftensdag
regions: [dk]
mday: 24
type: informal
- name: 1. juledag
regions: [dk]
mday: 25
- name: 2. juledag
regions: [dk]
mday: 26
tests: |
{Date.civil(2007,1,1) => 'Nytårsdag',
Date.civil(2007,2,18) => 'Fastelavn',
Date.civil(2007,4,9) => 'Danmarks besættelse',
Date.civil(2007,4,16) => 'Dronningens fødselsdag',
Date.civil(2007,4,5) => 'Skærtorsdag',
Date.civil(2007,4,6) => 'Langfredag',
Date.civil(2007,4,8) => 'Påskedag',
Date.civil(2007,4,9) => '2. påskedag',
Date.civil(2007,5,1) => 'Arbejdernes kampdag',
Date.civil(2007,5,4) => 'Store Bededag',
Date.civil(2007,5,17) => 'Kristi Himmelfartsdag',
Date.civil(2007,5,27) => 'Pinsedag',
Date.civil(2007,5,28) => '2. Pinsedag',
Date.civil(2007,6,5) => 'Grundlovsdag',
Date.civil(2007,12,24) => 'Juleaftensdag',
Date.civil(2007,12,25) => '1. juledag',
Date.civil(2007,12,26) => '2. juledag'}.each do |date, name|
assert_equal name, (Holidays.on(date, :dk, :informal)[0] || {})[:name]
end