holidays/data/it.yaml

66 lines
1.5 KiB
YAML
Raw Normal View History

2007-11-24 22:24:22 +01:00
# Italian holiday definitions for the Ruby Holiday gem.
2007-11-24 01:45:30 +01:00
#
# Updated: 2008-11-23.
# Sources:
# - http://en.wikipedia.org/wiki/Holidays_in_Italy
---
months:
0:
2007-11-24 21:55:42 +01:00
- name: Pasqua
2007-11-24 01:45:30 +01:00
regions: [it]
function: easter(year)
2007-11-24 21:55:42 +01:00
- name: Lunedì dell'Angelo
2007-11-24 01:45:30 +01:00
regions: [it]
function: easter(year)+1
2007-11-24 01:45:30 +01:00
1:
- name: Capodanno
regions: [it]
mday: 1
- name: Epifania
regions: [it]
mday: 6
4:
- name: Festa della Liberazione
regions: [it]
mday: 25
5:
- name: Festa dei Lavoratori
regions: [it]
mday: 1
6:
- name: Festa della Repubblica
regions: [it]
mday: 2
8:
- name: Assunzione
regions: [it]
mday: 15
11:
- name: Ognissanti
regions: [it]
mday: 1
12:
- name: Immacolata Concezione
regions: [it]
mday: 8
- name: Natale
regions: [it]
mday: 25
- name: Santo Stefano
regions: [it]
mday: 26
2007-12-05 23:27:05 +01:00
tests: |
{Date.civil(2007,1,1) => 'Capodanno',
Date.civil(2007,1,6) => 'Epifania',
Date.civil(2007,4,8) => 'Pasqua',
Date.civil(2007,4,9) => 'Lunedì dell\'Angelo',
Date.civil(2007,4,25) => 'Festa della Liberazione',
Date.civil(2007,5,1) => 'Festa dei Lavoratori',
Date.civil(2007,6,2) => 'Festa della Repubblica',
Date.civil(2007,8,15) => 'Assunzione',
Date.civil(2007,11,1) => 'Ognissanti',
Date.civil(2007,12,8) => 'Immacolata Concezione',
Date.civil(2007,12,25) => 'Natale',
Date.civil(2007,12,26) => 'Santo Stefano'}.each do |date, name|
assert_equal name, Holidays.on(date, :it, :informal)[0][:name]
end