This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
forked from holidays/definitions
-
Notifications
You must be signed in to change notification settings - Fork 0
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 holidays#34 from marocchino/update-korean
Update Korean holiday
- Loading branch information
Showing
1 changed file
with
41 additions
and
25 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 |
---|---|---|
@@ -1,75 +1,91 @@ | ||
# Republic of Korea holiday definitions for the Ruby Holiday gem. | ||
# Provided by Jonathan Pike | ||
# | ||
# Updated: 2017-02-23. | ||
# Updated: 2017-04-27. | ||
# 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) | ||
# | ||
# For Korean/English translations of each holiday: | ||
# - https://ko.wikipedia.org/wiki/%EB%8C%80%ED%95%9C%EB%AF%BC%EA%B5%AD%EC%9D%98_%EA%B3%B5%ED%9C%B4%EC%9D%BC | ||
# | ||
|
||
--- | ||
months: | ||
1: | ||
- name: Korean New Year | ||
- name: 설날 | ||
regions: [kr] | ||
function: lunar_to_solar(year, month, day, region) | ||
mday: 1 | ||
- name: New Year's Day | ||
- name: 설날 연휴 | ||
regions: [kr] | ||
function: lunar_to_solar(year, month, day, region) | ||
mday: 2 | ||
- name: 신정 | ||
regions: [kr] | ||
mday: 1 | ||
3: | ||
- name: Independence Movement Day | ||
- name: 3·1절 | ||
regions: [kr] | ||
mday: 1 | ||
4: | ||
- name: Buddah's Birthday | ||
- name: 석가탄신일 | ||
regions: [kr] | ||
function: lunar_to_solar(year, month, day, region) | ||
mday: 8 | ||
5: | ||
- name: Children's Day | ||
- name: 어린이날 | ||
regions: [kr] | ||
mday: 5 | ||
6: | ||
- name: Memorial Day | ||
- name: 현충일 | ||
regions: [kr] | ||
mday: 6 | ||
7: | ||
- name: Constitution Day | ||
- name: 제헌절 | ||
regions: [kr] | ||
mday: 17 | ||
type: informal | ||
8: | ||
- name: Korean Thanksgiving | ||
- name: 추석 | ||
regions: [kr] | ||
function: lunar_to_solar(year, month, day, region) | ||
mday: 15 | ||
- name: Liberation Day | ||
- name: 광복절 | ||
regions: [kr] | ||
mday: 15 | ||
10: | ||
- name: National Foundation Day | ||
- name: 개천절 | ||
regions: [kr] | ||
mday: 3 | ||
- name: Hangul Day | ||
- name: 한글날 | ||
regions: [kr] | ||
mday: 9 | ||
12: | ||
- name: Christmas Day | ||
- name: 크리스마스 | ||
regions: [kr] | ||
mday: 25 | ||
- name: 설날 연휴 | ||
regions: [kr] | ||
function: lunar_to_solar(year, month, day, region) | ||
mday: 29 | ||
|
||
tests: | | ||
{Date.civil(2016,2,8) => "Korean New Year", | ||
Date.civil(2016,5,14) => "Buddah\'s Birthday", | ||
Date.civil(2016,9,15) => "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| | ||
{Date.civil(2016,2,8) => "설날", | ||
Date.civil(2017,2,9) => "설날 연휴", | ||
Date.civil(2016,5,14) => "석가탄신일", | ||
Date.civil(2016,9,15) => "추석", | ||
Date.civil(2016,1,1) => "신정", | ||
Date.civil(2016,3,1) => "3·1절", | ||
Date.civil(2016,5,5) => "어린이날", | ||
Date.civil(2016,6,6) => "현충일", | ||
Date.civil(2016,7,17) => "제헌절", | ||
Date.civil(2016,8,15) => "광복절", | ||
Date.civil(2016,10,3) => "개천절", | ||
Date.civil(2016,10,9) => "한글날", | ||
Date.civil(2016,12,25) => "크리스마스", | ||
Date.civil(2017,1,27) => "설날 연휴", | ||
Date.civil(2017,1,28) => "설날" | ||
}.each do |date, name| | ||
assert_equal name, (Holidays.on(date, :kr, :informal)[0] || {})[:name] | ||
end |