-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #114 from fabersky/thailand
Thailand holidays
- Loading branch information
Showing
1 changed file
with
110 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# Thai holiday definitions for the Ruby Holiday gem. | ||
# | ||
# Updated: 2019-01-14. | ||
# Sources: | ||
# - https://en.wikipedia.org/wiki/Public_holidays_in_Thailand | ||
--- | ||
1: | ||
- name: วันขึ้นปีใหม่ | ||
regions: [th] | ||
mday: 1 | ||
4: | ||
- name: วันจักรี | ||
regions: [th] | ||
mday: 6 | ||
- name: วันสงกรานต์ | ||
regions: [th] | ||
mday: 13 | ||
- name: วันสงกรานต์ | ||
regions: [th] | ||
mday: 14 | ||
- name: วันสงกรานต์ | ||
regions: [th] | ||
mday: 15 | ||
7: | ||
- name: วันเฉลิมพระชนมพรรษาสมเด็จพระเจ้าอยู่หัวมหาวชิราลงกรณ บดินทรเทพยวรางกูร | ||
regions: [th] | ||
mday: 28 | ||
8: | ||
- name: วันเฉลิมพระชนมพรรษาสมเด็จพระนางเจ้าสิริกิติ์ พระบรมราชินีนาถในรัชกาลที่ ๙ | ||
regions: [th] | ||
mday: 12 | ||
10: | ||
- name: วันคล้ายวันสวรรคตพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร | ||
regions: [th] | ||
mday: 13 | ||
- name: วันปิยมหาราช | ||
regions: [th] | ||
mday: 23 | ||
12: | ||
- name: วันคล้ายวันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร | ||
regions: [th] | ||
mday: 5 | ||
- name: วันรัฐธรรมนูญ | ||
regions: [th] | ||
mday: 10 | ||
- name: วันสิ้นปี | ||
regions: [th] | ||
mday: 31 | ||
|
||
tests: | ||
- given: | ||
date: '20019-01-01' | ||
regions: ["th"] | ||
options: ["informal"] | ||
expect: | ||
name: "วันขึ้นปีใหม่" | ||
- given: | ||
date: '2019-04-06' | ||
regions: ["th"] | ||
options: ["informal"] | ||
expect: | ||
name: "วันจักรี" | ||
- given: | ||
date: ['2019-04-13', '2019-04-14', '2019-04-15'] | ||
regions: ["th"] | ||
options: ["informal"] | ||
expect: | ||
name: "วันสงกรานต์" | ||
- given: | ||
date: '2019-07-28' | ||
regions: ["th"] | ||
options: ["informal"] | ||
expect: | ||
name: "วันเฉลิมพระชนมพรรษาสมเด็จพระเจ้าอยู่หัวมหาวชิราลงกรณ บดินทรเทพยวรางกูร" | ||
- given: | ||
date: '2007-08-12' | ||
regions: ["th"] | ||
options: ["informal"] | ||
expect: | ||
name: "วันเฉลิมพระชนมพรรษาสมเด็จพระนางเจ้าสิริกิติ์ พระบรมราชินีนาถในรัชกาลที่ ๙" | ||
- given: | ||
date: '2019-10-13' | ||
regions: ["th"] | ||
options: ["informal"] | ||
expect: | ||
name: "วันคล้ายวันสวรรคตพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร" | ||
- given: | ||
date: '2019-10-23' | ||
regions: ["th"] | ||
options: ["informal"] | ||
expect: | ||
name: "วันปิยมหาราช" | ||
- given: | ||
date: '2019-12-05' | ||
regions: ["th"] | ||
options: ["informal"] | ||
expect: | ||
name: "วันคล้ายวันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร" | ||
- given: | ||
date: '2019-12-10' | ||
regions: ["th"] | ||
options: ["informal"] | ||
expect: | ||
name: "วันรัฐธรรมนูญ" | ||
- given: | ||
date: '2019-12-31' | ||
regions: ["th"] | ||
options: ["informal"] | ||
expect: | ||
name: "วันสิ้นปี " |