-
Notifications
You must be signed in to change notification settings - Fork 138
/
Copy pathkr.yaml
75 lines (73 loc) · 1.84 KB
/
kr.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
# Republic of Korea holiday definitions for the Ruby Holiday gem.
# Provided by Jonathan Pike
#
# Updated: 2017-02-23.
# Sources:
# - https://en.wikipedia.org/wiki/List_of_public_holidays_in_South_Korea
# - http://www.hko.gov.hk/gts/time/conversion.htm (for Lunar Calendar Conversions)
---
months:
1:
- name: Korean New Year
regions: [kr]
function: lunar_to_solar(year, month, day)
mday: 1
- name: New Year's Day
regions: [kr]
mday: 1
3:
- name: Independence Movement Day
regions: [kr]
mday: 1
4:
- name: Buddah's Birthday
regions: [kr]
function: lunar_to_solar(year, month, day)
mday: 8
5:
- name: Children's Day
regions: [kr]
mday: 5
6:
- name: Memorial Day
regions: [kr]
mday: 6
7:
- name: Constitution Day
regions: [kr]
mday: 17
type: informal
8:
- name: Korean Thanksgiving
regions: [kr]
function: lunar_to_solar(year, month, day)
mday: 15
- name: Liberation Day
regions: [kr]
mday: 15
10:
- name: National Foundation Day
regions: [kr]
mday: 3
- name: Hangul Day
regions: [kr]
mday: 9
12:
- name: Christmas Day
regions: [kr]
mday: 25
tests: |
{Date.civil(2016,2,8) => "Korean New Year",
Date.civil(2016,5,14) => "Buddah\'s Birthday",
Date.civil(2016,9,12) => "Korean Thanksgiving",
Date.civil(2016,1,1) => "New Year\'s Day",
Date.civil(2016,3,1) => "Independence Movement Day",
Date.civil(2016,5,5) => "Children\'s Day",
Date.civil(2016,6,6) => "Memorial Day",
Date.civil(2016,7,17) => "Constitution Day",
Date.civil(2016,8,15) => "Liberation Day",
Date.civil(2016,10,3) => "National Foundation Day",
Date.civil(2016,10,9) => "Hangul Day",
Date.civil(2016,12,25) => "Christmas Day"}.each do |date, name|
assert_equal name, (Holidays.on(date, :kr, :informal)[0] || {})[:name]
end