holidays/data/mx.yaml
2007-12-05 22:27:05 +00:00

106 lines
2.3 KiB
YAML

# Mexican holiday definitions for the Ruby Holiday gem.
# Updated 2008-12-05.
# Sources:
# - http://www.britishembassy.gov.uk/servlet/Front?pagename=OpenMarket/Xcelerate/ShowPage&c=Page&cid=1125561634963
# - http://www.usembassy-mexico.gov/eng/holidays.html
---
months:
1:
- name: Año nuevo
regions: [mx]
mday: 1
- name: Dia de los Santos Reyes
regions: [mx]
mday: 6
2:
- name: Día de la Constitución
week: 1
regions: [mx]
wday: 1
3:
- name: Natalicio de Benito Juárez
week: 3
regions: [mx]
wday: 1
4:
- name: Día del Niño
regions: [mx]
mday: 30
type: informal
5:
- name: Día del Trabajo
regions: [mx]
mday: 1
- name: Cinco de Mayo
regions: [mx]
mday: 5
type: informal
- name: La Batalla de Puebla
regions: [mx_pue]
mday: 5
- name: Día de la Madre
regions: [mx]
mday: 10
type: informal
- name: Día del Maestro
regions: [mx]
mday: 15
type: informal
6:
- name: Día del Padre
regions: [mx]
wday: 0
week: 3
type: informal
9:
- name: Grito de Dolores
regions: [mx]
mday: 15
- name: Día de la Independencia
regions: [mx]
mday: 16
10:
- name: Día de la Raza
regions: [mx]
mday: 12
type: informal
11:
- name: Todos los Santos
regions: [mx]
mday: 1
type: informal
- name: Los Fieles Difuntos
regions: [mx]
mday: 2
type: informal
- name: Día de la Revolución
week: 3
regions: [mx]
wday: 1
12:
- name: Día de la Virgen de Guadalupe
regions: [mx]
mday: 12
type: informal
- name: Nochebuena
regions: [mx]
mday: 24
type: informal
- name: Navidad
regions: [mx]
mday: 25
- name: Los Santos Inocentes
regions: [mx]
mday: 28
tests: |
{Date.civil(2007,1,1) => 'Año nuevo',
Date.civil(2007,2,5) => 'Día de la Constitución',
Date.civil(2007,5,1) => 'Día del Trabajo',
Date.civil(2007,5,5) => 'Cinco de Mayo',
Date.civil(2007,9,16) => 'Día de la Independencia',
Date.civil(2007,11,1) => 'Todos los Santos',
Date.civil(2007,11,2) => 'Los Fieles Difuntos',
Date.civil(2007,11,19) => 'Día de la Revolución',
Date.civil(2007,12,25) => 'Navidad'}.each do |date, name|
assert_equal name, Holidays.on(date, :mx, :informal)[0][:name]
end