holidays/data/us.yaml
Alex Dunae e036b8e50e Added code to check for identical functions
Enforced UTF-8 with SVN mime-type in data/
Updated build_defs.rb
Added some European tests
2007-11-29 02:24:00 +00:00

64 lines
1.3 KiB
YAML

# United States holiday definitions for the Ruby Holiday gem.
#
# Updated: 2008-11-24.
# Source: http://en.wikipedia.org/wiki/Public_holidays_of_the_United_States
---
months:
0:
- name: Good Friday
regions: [us]
function: easter(year)-2
type: informal
1:
- name: New Year's Day
regions: [us]
mday: 1
- name: Martin Luther King, Jr. Day
week: 3
regions: [us]
wday: 1
- name: Inauguration Day
function: us_inauguration_day(year)
regions: [us_dc]
2:
- name: Presidents' Day
week: 3
regions: [us]
wday: 1
5:
- name: Memorial Day
week: -1
regions: [us]
wday: 1
7:
- name: Independence Day
regions: [us]
mday: 4
9:
- name: Labor Day
week: 1
regions: [us]
wday: 1
10:
- name: Columbus Day
week: 2
regions: [us]
wday: 1
11:
- name: Veterans Day
regions: [us]
mday: 11
- name: Thanksgiving
week: 4
regions: [us]
wday: 4
12:
- name: Christmas Day
regions: [us]
mday: 25
methods:
us_inauguration_day: |
# January 20, every fourth year, following Presidential election
def self.us_inauguration_day(year)
year % 4 == 1 ? 20 : nil
end