mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-06 13:18:14 +08:00
94 lines
1.8 KiB
YAML
94 lines
1.8 KiB
YAML
# NERC holiday definitions for the Ruby Holiday gem.
|
|
#
|
|
# By Adam Strickland
|
|
# Source: www.nerc.com/docs/oc/rs/Additional_Off-peak_Days.doc
|
|
#
|
|
# Updated 2013-01-03.
|
|
---
|
|
months:
|
|
1:
|
|
- name: New Year's Day
|
|
regions: [nerc]
|
|
mday: 1
|
|
observed: to_monday_if_sunday(date)
|
|
5:
|
|
- name: Memorial Day
|
|
week: -1
|
|
regions: [nerc]
|
|
wday: 1
|
|
7:
|
|
- name: Independence Day
|
|
regions: [nerc]
|
|
mday: 4
|
|
observed: to_monday_if_sunday(date)
|
|
9:
|
|
- name: Labor Day
|
|
week: 1
|
|
regions: [nerc]
|
|
wday: 1
|
|
11:
|
|
- name: Thanksgiving
|
|
week: 4
|
|
regions: [nerc]
|
|
wday: 4
|
|
12:
|
|
- name: Christmas Day
|
|
regions: [nerc]
|
|
mday: 25
|
|
observed: to_monday_if_sunday(date)
|
|
|
|
tests:
|
|
- given:
|
|
date: '2013-01-01'
|
|
regions: ["nerc"]
|
|
options: ["observed"]
|
|
expect:
|
|
name: "New Year's Day"
|
|
- given:
|
|
date: '2017-01-02'
|
|
regions: ["nerc"]
|
|
options: ["observed"]
|
|
expect:
|
|
name: "New Year's Day"
|
|
- given:
|
|
date: '2013-05-27'
|
|
regions: ["nerc"]
|
|
options: ["observed"]
|
|
expect:
|
|
name: "Memorial Day"
|
|
- given:
|
|
date: '2013-07-04'
|
|
regions: ["nerc"]
|
|
options: ["observed"]
|
|
expect:
|
|
name: "Independence Day"
|
|
- given:
|
|
date: '2010-07-05'
|
|
regions: ["nerc"]
|
|
options: ["observed"]
|
|
expect:
|
|
name: "Independence Day"
|
|
- given:
|
|
date: '2013-09-02'
|
|
regions: ["nerc"]
|
|
options: ["observed"]
|
|
expect:
|
|
name: "Labor Day"
|
|
- given:
|
|
date: '2013-11-28'
|
|
regions: ["nerc"]
|
|
options: ["observed"]
|
|
expect:
|
|
name: "Thanksgiving"
|
|
- given:
|
|
date: '2013-12-25'
|
|
regions: ["nerc"]
|
|
options: ["observed"]
|
|
expect:
|
|
name: "Christmas Day"
|
|
- given:
|
|
date: '2011-12-26'
|
|
regions: ["nerc"]
|
|
options: ["observed"]
|
|
expect:
|
|
name: "Christmas Day"
|