holidays/data/fr.yaml

70 lines
1.7 KiB
YAML

# French holiday definitions for the Ruby Holiday gem.
#
# 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)+39
- name: Pentecôte
regions: [fr]
function: easter(year)+49
- name: Lundi de Pentecôte
regions: [fr]
function: easter(year)+50
1:
- name: Jour de l'an
regions: [fr]
mday: 1
5:
- name: Fête du travail
regions: [fr]
mday: 1
- name: Victoire 1945
regions: [fr]
mday: 8
7:
- name: Fête nationale
regions: [fr]
mday: 14
8:
- name: Assomption
regions: [fr]
mday: 15
11:
- name: Toussaint
regions: [fr]
mday: 1
- name: Armistice 1918
regions: [fr]
mday: 11
12:
- name: Nöel
regions: [fr]
mday: 25
tests: |
{Date.civil(2007,1,1) => 'Jour de l\'an',
Date.civil(2007,4,8) => 'Pâques',
Date.civil(2007,4,9) => 'Lundi de Pâques',
Date.civil(2007,5,1) => 'Fête du travail',
Date.civil(2007,5,8) => 'Victoire 1945',
Date.civil(2007,5,17) => 'Ascension',
Date.civil(2007,5,27) => 'Pentecôte',
Date.civil(2007,5,28) => 'Lundi de Pentecôte',
Date.civil(2007,7,14) => 'Fête nationale',
Date.civil(2007,8,15) => 'Assomption',
Date.civil(2007,11,1) => 'Toussaint',
Date.civil(2007,11,11) => 'Armistice 1918',
Date.civil(2007,12,25) => 'Nöel'}.each do |date, name|
assert_equal name, (Holidays.on(date, :fr, :informal)[0] || {})[:name]
end