Add Liechtenstein holiday defs -- mercy vielmal: Bernhard Furtmueller

This commit is contained in:
Alex Dunae 2011-10-18 16:18:05 -07:00
parent 3f23f56c9a
commit 1e8b10e88a
36 changed files with 737 additions and 514 deletions

View file

@ -16,6 +16,7 @@ defs:
IE: ['ie.yaml']
IS: ['is.yaml']
IT: ['it.yaml']
LI: ['li.yaml']
MX: ['mx.yaml', 'north_america_informal.yaml']
NL: ['nl.yaml']
"NO": ['no.yaml']
@ -30,5 +31,5 @@ defs:
ZA: ['za.yaml']
North_America: ['ca.yaml', 'mx.yaml', 'us.yaml', 'north_america_informal.yaml']
Scandinavia: ['dk.yaml', 'is.yaml', 'no.yaml', 'se.yaml', 'fi.yaml']
Europe: ['at.yaml', 'cz.yaml', 'dk.yaml', 'de.yaml', 'el.yaml', 'es.yaml', 'fr.yaml', 'gb.yaml', 'ie.yaml', 'is.yaml', 'it.yaml', 'nl.yaml', 'no.yaml', 'pl.yaml', 'pt.yaml']
Europe: ['at.yaml', 'cz.yaml', 'dk.yaml', 'de.yaml', 'el.yaml', 'es.yaml', 'fr.yaml', 'gb.yaml', 'ie.yaml', 'is.yaml', 'it.yaml', 'li.yaml', 'nl.yaml', 'no.yaml', 'pl.yaml', 'pt.yaml']
JP: ['jp.yaml']

102
data/li.yaml Normal file
View file

@ -0,0 +1,102 @@
# Liechtenstein holiday definitions for the Ruby Holiday gem.
#
# Updated: 2011-10-17.
# Sources:
# http://www.tourismus.li/de/navpage-RegionLI-InformationLI-44728.html
---
months:
0:
- name: Fasnachtsdienstag
regions: [li]
function: easter(year)-47
- name: Karfreitag
regions: [li]
function: easter(year)-2
- name: Ostern
regions: [li]
function: easter(year)
type: informal
- name: Ostermontag
regions: [li]
function: easter(year)+1
- name: Auffahrt
regions: [li]
function: easter(year)+39
- name: Pfingstmontag
regions: [li]
function: easter(year)+50
- name: Fronleichnam
regions: [li]
function: easter(year)+60
1:
- name: Neujahrstag
regions: [li]
mday: 1
- name: Heilige Drei Könige
regions: [li, li]
mday: 6
2:
- name: Maria Lichtmess
regions: [li]
mday: 2
3:
- name: St. Josef
regions: [li]
mday: 19
5:
- name: Tag der Arbeit
regions: [li]
mday: 1
8:
- name: Staatsfeiertag
regions: [li]
mday: 15
9:
- name: Maria Geburt
regions: [li]
mday: 8
11:
- name: Allerheiligen
regions: [li]
mday: 1
12:
- name: Maria Empfängnis
regions: [li]
mday: 8
- name: Heilig Abend
regions: [li]
mday: 24
- name: Weihnachten
regions: [li]
mday: 25
- name: Stefanstag
regions: [li]
mday: 26
- name: Silvester
regions: [li]
mday: 31
tests: |
{Date.civil(2009,1,1) => 'Neujahrstag',
Date.civil(2011,3,8) => 'Fasnachtsdienstag',
Date.civil(2009,4,10) => 'Karfreitag',
Date.civil(2009,4,12) => 'Ostern',
Date.civil(2009,4,13) => 'Ostermontag',
Date.civil(2009,5,21) => 'Auffahrt',
Date.civil(2009,6,1) => 'Pfingstmontag',
Date.civil(2009,12,25) => 'Weihnachten',
Date.civil(2009,12,26) => 'Stefanstag'}.each do |date, name|
assert_equal name, Holidays.on(date, :li, :informal)[0][:name]
end
[:li].each do |r|
assert_equal 'Fronleichnam', Date.civil(2009,6,11).holidays(r)[0][:name]
end
[:li].each do |r|
assert_equal 'Staatsfeiertag', Date.civil(2009,8,15).holidays(r)[0][:name]
end
[:li].each do |r|
assert_equal 'Allerheiligen', Date.civil(2009,11,1).holidays(r)[0][:name]
end