This repository has been archived by the owner on Jun 23, 2020. It is now read-only.
forked from holidays/definitions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sg.yaml
89 lines (85 loc) · 1.88 KB
/
sg.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# 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"