holidays/data/dk.yaml

117 lines
2.9 KiB
YAML

# 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)-49
type: informal
- name: Palmesøndag
regions: [dk]
function: easter(year)-7
- name: Skærtorsdag
regions: [dk]
function: easter(year)-3
- name: Langfredag
regions: [dk]
function: easter(year)-2
- name: Påskedag
regions: [dk]
function: easter(year)
- name: 2. påskedag
regions: [dk]
function: easter(year)+1
- name: Store Bededag
regions: [dk]
function: easter(year)+26
- name: Kristi Himmelfartsdag
regions: [dk]
function: easter(year)+39
- name: Pinsedag
regions: [dk]
function: easter(year)+49
- name: 2. Pinsedag
regions: [dk]
function: easter(year)+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
- name: Danmarks befrielse
regions: [dk]
mday: 5
type: informal
6:
- name: Grundlovsdag
regions: [dk]
mday: 5
- 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
- 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