Skip to content

Commit

Permalink
Merge pull request #114 from fabersky/thailand
Browse files Browse the repository at this point in the history
Thailand holidays
  • Loading branch information
ppeble authored Feb 3, 2019
2 parents b552ae5 + 0224098 commit e748164
Showing 1 changed file with 110 additions and 0 deletions.
110 changes: 110 additions & 0 deletions th.yaml
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: "วันสิ้นปี "

0 comments on commit e748164

Please sign in to comment.