2007-11-21 22:08:34 +01:00
|
|
|
# Mexican holiday definitions for the Ruby Holiday gem.
|
2007-12-05 23:27:05 +01:00
|
|
|
# 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
|
2007-11-21 22:08:34 +01:00
|
|
|
---
|
2007-11-22 23:28:38 +01:00
|
|
|
months:
|
|
|
|
1:
|
2007-11-29 03:24:00 +01:00
|
|
|
- name: Año nuevo
|
2007-11-22 23:28:38 +01:00
|
|
|
regions: [mx]
|
|
|
|
mday: 1
|
2007-11-29 03:24:00 +01:00
|
|
|
- name: Dia de los Santos Reyes
|
2007-11-22 23:28:38 +01:00
|
|
|
regions: [mx]
|
2007-11-29 03:24:00 +01:00
|
|
|
mday: 6
|
2007-11-22 23:28:38 +01:00
|
|
|
2:
|
2007-11-29 03:24:00 +01:00
|
|
|
- name: Día de la Constitución
|
2007-11-22 23:28:38 +01:00
|
|
|
week: 1
|
|
|
|
regions: [mx]
|
|
|
|
wday: 1
|
|
|
|
3:
|
2007-11-29 03:24:00 +01:00
|
|
|
- name: Natalicio de Benito Juárez
|
2007-11-22 23:28:38 +01:00
|
|
|
week: 3
|
|
|
|
regions: [mx]
|
|
|
|
wday: 1
|
2007-11-29 03:24:00 +01:00
|
|
|
4:
|
|
|
|
- name: Día del Niño
|
|
|
|
regions: [mx]
|
|
|
|
mday: 30
|
|
|
|
type: informal
|
2007-11-22 23:28:38 +01:00
|
|
|
5:
|
2007-11-29 03:24:00 +01:00
|
|
|
- name: Día del Trabajo
|
2007-11-22 23:28:38 +01:00
|
|
|
regions: [mx]
|
|
|
|
mday: 1
|
2007-11-29 03:24:00 +01:00
|
|
|
- name: Cinco de Mayo
|
2007-11-22 23:28:38 +01:00
|
|
|
regions: [mx]
|
|
|
|
mday: 5
|
2007-11-29 03:24:00 +01:00
|
|
|
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
|
2007-11-22 23:28:38 +01:00
|
|
|
regions: [mx]
|
|
|
|
mday: 16
|
2007-11-29 03:24:00 +01:00
|
|
|
10:
|
|
|
|
- name: Día de la Raza
|
|
|
|
regions: [mx]
|
|
|
|
mday: 12
|
|
|
|
type: informal
|
2007-11-22 23:28:38 +01:00
|
|
|
11:
|
2007-11-29 03:24:00 +01:00
|
|
|
- name: Todos los Santos
|
|
|
|
regions: [mx]
|
|
|
|
mday: 1
|
|
|
|
type: informal
|
|
|
|
- name: Los Fieles Difuntos
|
2007-11-22 23:28:38 +01:00
|
|
|
regions: [mx]
|
|
|
|
mday: 2
|
2007-11-29 03:24:00 +01:00
|
|
|
type: informal
|
|
|
|
- name: Día de la Revolución
|
2007-11-22 23:28:38 +01:00
|
|
|
week: 3
|
|
|
|
regions: [mx]
|
|
|
|
wday: 1
|
|
|
|
12:
|
2007-11-29 03:24:00 +01:00
|
|
|
- name: Día de la Virgen de Guadalupe
|
2007-11-22 23:28:38 +01:00
|
|
|
regions: [mx]
|
|
|
|
mday: 12
|
2007-11-29 03:24:00 +01:00
|
|
|
type: informal
|
|
|
|
- name: Nochebuena
|
|
|
|
regions: [mx]
|
|
|
|
mday: 24
|
|
|
|
type: informal
|
|
|
|
- name: Navidad
|
2007-11-22 23:28:38 +01:00
|
|
|
regions: [mx]
|
|
|
|
mday: 25
|
2007-11-29 03:24:00 +01:00
|
|
|
- name: Los Santos Inocentes
|
|
|
|
regions: [mx]
|
|
|
|
mday: 28
|
2007-12-05 23:27:05 +01:00
|
|
|
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|
|
2010-04-28 14:50:16 +02:00
|
|
|
assert_equal name, (Holidays.on(date, :mx, :informal)[0] || {})[:name]
|
2007-12-05 23:27:05 +01:00
|
|
|
end
|