-
Notifications
You must be signed in to change notification settings - Fork 137
/
no.yaml
90 lines (90 loc) · 2.28 KB
/
no.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
# Norwegian holiday definitions for the Ruby Holiday gem.
#
# Added: 20010-02-22.
# Sources:
# - http://no.wikipedia.org/wiki/Offentlig_fridag
# - http://www.timeanddate.com/norsk/kalender.html
---
months:
0:
- name: Fastelavn
regions: ["no"]
function: easter(year)
function_modifier: -49
type: informal
- name: Palmesøndag
regions: ["no"]
function: easter(year)
function_modifier: -7
- name: Skjærtorsdag
regions: ["no"]
function: easter(year)
function_modifier: -3
- name: Langfredag
regions: ["no"]
function: easter(year)
function_modifier: -2
- name: 1. påskedag
regions: ["no"]
function: easter(year)
- name: 2. påskedag
regions: ["no"]
function: easter(year)
function_modifier: 1
- name: Kristi Himmelfartsdag
regions: ["no"]
function: easter(year)
function_modifier: 39
- name: 1. pinsedag
regions: ["no"]
function: easter(year)
function_modifier: 49
- name: 2. pinsedag
regions: ["no"]
function: easter(year)
function_modifier: 50
1:
- name: Nyttårsdag
regions: ["no"]
mday: 1
5:
- name: 1. mai
regions: ["no"]
mday: 1
- name: 17. mai
regions: ["no"]
mday: 17
12:
- name: Julaften
regions: ["no"]
mday: 24
type: informal
- name: 1. juledag
regions: ["no"]
mday: 25
- name: 2. juledag
regions: ["no"]
mday: 26
- name: Nyttårsaften
regions: ["no"]
mday: 31
type: informal
tests: |
{Date.civil(2010,1,1) => 'Nyttårsdag',
Date.civil(2010,5,1) => '1. mai',
Date.civil(2010,5,17) => '17. mai',
Date.civil(2010,12,24) => 'Julaften',
Date.civil(2010,12,25) => '1. juledag',
Date.civil(2010,12,26) => '2. juledag',
Date.civil(2010,12,31) => 'Nyttårsaften',
Date.civil(2010,2,14) => 'Fastelavn',
Date.civil(2010,3,28) => 'Palmesøndag',
Date.civil(2010,4,1) => 'Skjærtorsdag',
Date.civil(2010,4,2) => 'Langfredag',
Date.civil(2010,4,4) => '1. påskedag',
Date.civil(2010,4,5) => '2. påskedag',
Date.civil(2010,5,13) => 'Kristi Himmelfartsdag',
Date.civil(2010,5,23) => '1. pinsedag',
Date.civil(2010,5,24) => '2. pinsedag'}.each do |date, name|
assert_equal name, (Holidays.on(date, :no, :informal)[0] || {})[:name]
end