2007-11-23 05:28:15 +01:00
|
|
|
# French holiday definitions for the Ruby Holiday gem.
|
|
|
|
#
|
2007-11-29 21:05:17 +01:00
|
|
|
# Updated: 2008-11-2*.
|
2007-11-23 05:28:15 +01:00
|
|
|
# Sources:
|
|
|
|
# - http://en.wikipedia.org/wiki/Holidays_in_France
|
2007-11-29 21:05:17 +01:00
|
|
|
# - http://riviera.angloinfo.com/information/1/pub_hols.asp
|
2007-11-23 05:28:15 +01:00
|
|
|
---
|
|
|
|
months:
|
|
|
|
0:
|
|
|
|
- name: Pâques
|
|
|
|
regions: [fr]
|
2007-11-29 03:24:00 +01:00
|
|
|
function: easter(year)
|
2007-11-29 21:05:17 +01:00
|
|
|
- name: Lundi de Pâques
|
|
|
|
regions: [fr]
|
|
|
|
function: easter(year)+1
|
2007-11-23 05:28:15 +01:00
|
|
|
- name: Ascension
|
|
|
|
regions: [fr]
|
2007-11-29 21:05:17 +01:00
|
|
|
function: easter(year)+39
|
2007-11-23 05:28:15 +01:00
|
|
|
- name: Pentecôte
|
|
|
|
regions: [fr]
|
2007-11-29 03:24:00 +01:00
|
|
|
function: easter(year)+49
|
2007-11-23 05:28:15 +01:00
|
|
|
- name: Lundi de Pentecôte
|
|
|
|
regions: [fr]
|
2007-11-29 03:24:00 +01:00
|
|
|
function: easter(year)+50
|
2007-11-23 05:28:15 +01:00
|
|
|
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
|
2007-11-23 22:10:21 +01:00
|
|
|
12:
|
|
|
|
- name: Nöel
|
2007-11-23 05:28:15 +01:00
|
|
|
regions: [fr]
|
|
|
|
mday: 25
|
2007-12-05 23:27:05 +01:00
|
|
|
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|
|
2010-04-28 14:50:16 +02:00
|
|
|
assert_equal name, (Holidays.on(date, :fr, :informal)[0] || {})[:name]
|
2007-12-05 23:27:05 +01:00
|
|
|
end
|