holidays/data/us.yaml

59 lines
1.2 KiB
YAML
Raw Normal View History

# United States holiday definitions for the Ruby Holiday gem.
2007-11-22 23:28:38 +01:00
#
# Updated: 2008-11-22.
# Source: http://en.wikipedia.org/wiki/Public_holidays_of_the_United_States
---
2007-11-22 23:28:38 +01:00
months:
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
2007-11-25 00:22:10 +01:00
function: lambda { |year| Holidays.us_inauguration_day(year) }
2007-11-22 23:28:38 +01:00
regions: [us]
3:
- 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 Day
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