mirror of
https://github.com/discourse/discourse.git
synced 2026-08-08 17:53:55 +08:00
171 lines
3.5 KiB
YAML
Vendored
171 lines
3.5 KiB
YAML
Vendored
# Malaysia 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.com.my/
|
|
|
|
months:
|
|
1:
|
|
- name: New Year's Day
|
|
regions: [my]
|
|
mday: 1
|
|
observed: to_weekday_if_weekend(date)
|
|
- name: Thaipusam
|
|
regions: [my]
|
|
mday: 25
|
|
year_ranges:
|
|
limited: [2024]
|
|
2:
|
|
- name: Chinese New Year
|
|
regions: [my]
|
|
mday: 12
|
|
year_ranges:
|
|
limited: [2024]
|
|
4:
|
|
- name: Hari Raya Aidilfitri
|
|
regions: [my]
|
|
mday: 10
|
|
year_ranges:
|
|
limited: [2024]
|
|
- name: Hari Raya Aidilfitri (Day 2)
|
|
regions: [my]
|
|
mday: 11
|
|
year_ranges:
|
|
limited: [2024]
|
|
5:
|
|
- name: Labour Day
|
|
regions: [my]
|
|
mday: 1
|
|
- name: Wesak Day
|
|
regions: [my]
|
|
mday: 22
|
|
year_ranges:
|
|
limited: [2024]
|
|
6:
|
|
- name: Agong's Birthday
|
|
regions: [my]
|
|
mday: 3
|
|
observed: to_weekday_if_weekend(date)
|
|
- name: Hari Raya Haji
|
|
regions: [my]
|
|
mday: 17
|
|
year_ranges:
|
|
limited: [2024]
|
|
7:
|
|
- name: Awal Muharram
|
|
regions: [my]
|
|
mday: 8
|
|
year_ranges:
|
|
limited: [2024]
|
|
9:
|
|
- name: Malaysia Day
|
|
regions: [my]
|
|
mday: 16
|
|
observed: to_weekday_if_weekend(date)
|
|
- name: Malaysia Day (Day 2)
|
|
regions: [my]
|
|
mday: 17
|
|
year_ranges:
|
|
limited: [2024]
|
|
10:
|
|
- name: Deepavali
|
|
regions: [my]
|
|
mday: 31
|
|
year_ranges:
|
|
limited: [2024]
|
|
12:
|
|
- name: Christmas Day
|
|
regions: [my]
|
|
mday: 25
|
|
observed: to_weekday_if_weekend(date)
|
|
|
|
tests:
|
|
- given:
|
|
date: '2023-01-01'
|
|
regions: ["my"]
|
|
options: ["informal"]
|
|
expect:
|
|
name: "New Year's Day"
|
|
- given:
|
|
date: '2023-01-25'
|
|
regions: ["my"]
|
|
options: ["informal"]
|
|
expect:
|
|
name: "Thaipusam"
|
|
- given:
|
|
date: '2023-02-12'
|
|
regions: ["my"]
|
|
options: ["informal"]
|
|
expect:
|
|
name: "Chinese New Year"
|
|
- given:
|
|
date: '2023-04-10'
|
|
regions: ["my"]
|
|
options: ["informal"]
|
|
expect:
|
|
name: "Hari Raya Aidilfitri"
|
|
- given:
|
|
date: '2023-04-11'
|
|
regions: ["my"]
|
|
options: ["informal"]
|
|
expect:
|
|
name: "Hari Raya Aidilfitri (Day 2)"
|
|
- given:
|
|
date: '2023-05-01'
|
|
regions: ["my"]
|
|
options: ["informal"]
|
|
expect:
|
|
name: "Labour Day"
|
|
- given:
|
|
date: '2023-05-22'
|
|
regions: ["my"]
|
|
options: ["informal"]
|
|
expect:
|
|
name: "Wesak Day"
|
|
- given:
|
|
date: '2023-06-03'
|
|
regions: ["my"]
|
|
options: ["informal"]
|
|
expect:
|
|
name: "Agong's Birthday"
|
|
- given:
|
|
date: '2024-06-17'
|
|
regions: ["my"]
|
|
options: ["observed"]
|
|
expect:
|
|
name: "Hari Raya Haji"
|
|
- given:
|
|
date: '2024-07-08'
|
|
regions: ["my"]
|
|
options: ["informal"]
|
|
expect:
|
|
name: "Awal Muharram"
|
|
- given:
|
|
date: '2023-09-16'
|
|
regions: ["my"]
|
|
options: ["informal"]
|
|
expect:
|
|
name: "Malaysia Day"
|
|
- given:
|
|
date: '2023-09-17'
|
|
regions: ["my"]
|
|
options: ["informal"]
|
|
expect:
|
|
name: "Malaysia Day (Day 2)"
|
|
- given:
|
|
date: '2023-10-31'
|
|
regions: ["my"]
|
|
options: ["observed"]
|
|
expect:
|
|
name: "Deepavali"
|
|
- given:
|
|
date: '2023-12-25'
|
|
regions: ["my"]
|
|
options: ["informal"]
|
|
expect:
|
|
name: "Christmas Day"
|