Current section
Files
Jump to
Current section
Files
priv/calendars/definitions/sg.yaml
# Singapore holiday definitions for the Holidays gem!
# Days not included in the definitions (yet):
# Vesak Day (falls on the first full moon in May)
# Lunar New Year (falls on the first day of the Lunar Calendar)
# Hari Raya Puasa and Hari Raya Haji (based on moon sightings, Islamic Calendar)
# Deepavali (15th Day of September or October, based on the Hindu Calendar)
# Source:
# http://publicholidays.sg/
months:
0:
- name: Good Friday
regions: [sg]
function: easter(year)
function_modifier: -2
1:
- name: New Year's Day
regions: [sg]
mday: 1
observed: to_weekday_if_weekend(date)
2:
- name: Valentine's Day
regions: [sg]
mday: 14
type: informal
- name: Total Defence Day
regions: [sg]
mday: 15
type: informal
5:
- name: Labour Day
regions: [sg]
mday: 1
8:
- name: National Day
regions: [sg]
mday: 9
observed: to_weekday_if_weekend(date)
12:
- name: Christmas Day
regions: [sg]
mday: 25
observed: to_weekday_if_weekend(date)
tests:
- given:
date: '2014-01-01'
regions: ["sg"]
options: ["informal"]
expect:
name: "New Year's Day"
- given:
date: '2014-02-14'
regions: ["sg"]
options: ["informal"]
expect:
name: "Valentine's Day"
- given:
date: '2014-02-15'
regions: ["sg"]
options: ["informal"]
expect:
name: "Total Defence Day"
- given:
date: '2014-04-18'
regions: ["sg"]
options: ["informal"]
expect:
name: "Good Friday"
- given:
date: '2014-05-01'
regions: ["sg"]
options: ["informal"]
expect:
name: "Labour Day"
- given:
date: '2014-08-09'
regions: ["sg"]
options: ["informal"]
expect:
name: "National Day"
- given:
date: '2014-12-25'
regions: ["sg"]
options: ["informal"]
expect:
name: "Christmas Day"