Test suite for DE, ES and FR

This commit is contained in:
Alex Dunae 2007-11-29 20:05:17 +00:00
parent c75146cdb5
commit 6cb7ccd148
8 changed files with 195 additions and 29 deletions

View file

@ -1,14 +1,20 @@
# German holiday definitions for the Ruby Holiday gem.
#
# Updated: 2008-11-23.
# Updated: 2008-11-29.
# 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
---
months:
0:
- name: Karfreitag
regions: [de]
function: easter(year)-2
- name: Ostern
regions: [de]
function: easter(year)
type: informal
- name: Ostermontag
regions: [de]
function: easter(year)+1
@ -37,7 +43,7 @@ months:
mday: 8
8:
- name: Mariä Himmelfahrt
regions: [de_by]
regions: [de_by, de_sl]
mday: 15
10:
- name: Tag der Deutschen Einheit
@ -50,10 +56,25 @@ months:
- name: Allerheiligen
regions: [de_bw, de_by, de_nw, de_rp, de_sl]
mday: 1
- name: Buß- und Bettag
regions: [de_by, de_sn]
function: de_buss_und_bettag(year)
12:
- name: 1. Weihnachtstag
regions: [de]
mday: 25
- name: 2. Weihnachtstag
regions: [de]
mday: 25
mday: 26
methods:
de_buss_und_bettag: |
# Germany: Wednesday before November 23
def self.de_buss_und_bettag(year)
date = Date.civil(year,11,23)
if date.wday > 3
date -= (date.wday - 3)
else
date -= (date.wday + 4)
end
date
end

View file

@ -1,8 +1,12 @@
# Spanish holiday definitions for the Ruby Holiday gem.
#
# Updated: 2008-11-22.
# Including the Balearic Islands and the Canary Islands.
#
# Updated: 2008-11-29.
#
# Sources:
# - http://en.wikipedia.org/wiki/Public_holidays_in_Spain
# - http://www.timeanddate.com/calendar/index.html?country=16
#
# Notes:
# - Valencia is encoded as both es_v and es_vc

View file

@ -1,17 +1,21 @@
# French holiday definitions for the Ruby Holiday gem.
#
# Updated: 2008-11-22.
# Updated: 2008-11-2*.
# Sources:
# - http://en.wikipedia.org/wiki/Holidays_in_France
# - http://riviera.angloinfo.com/information/1/pub_hols.asp
---
months:
0:
- name: Pâques
regions: [fr]
function: easter(year)
- name: Lundi de Pâques
regions: [fr]
function: easter(year)+1
- name: Ascension
regions: [fr]
function: easter(year)+40
function: easter(year)+39
- name: Pentecôte
regions: [fr]
function: easter(year)+49