korean_lunar_calendar_py
===========================
ํ๊ตญ ์์๋ ฅ ๋ณํ
Overview
^^^^^^^^
Here is a library to convert Korean lunar-calendar to Gregorian
calendar.
Korean calendar and Chinese calendar is same lunar calendar but have
different date.
This follow the KARI(Korea Astronomy and Space Science Institute)
ํ๊ตญ ์์๋ ฅ ๋ณํ (ํ๊ตญ์ฒ๋ฌธ์ฐ๊ตฌ์ ๊ธฐ์ค) - ๋คํธ์ํฌ ์ฐ๊ฒฐ ๋ถํ์
์๋ ฅ ๋ณํ์ 1000๋
01์ 01์ผ ๋ถํฐ 2050๋
11์ 18์ผ๊น์ง ์ง์
์๋ ฅ ๋ณํ์ 1000๋
02์ 13์ผ ๋ถํฐ 2050๋
12์ 31์ผ๊น์ง ์ง์
::
Gregorian calendar (1000-02-13 ~ 2050-12-31) <--> Korean lunar-calendar (1000-01-01 ~ 2050-11-18)
Install
^^^^^^^
pip install korean_lunar_calendar
To use
^^^^^^
(0) import module
.. code:: python
from korean_lunar_calendar import KoreanLunarCalendar
(1) Korean Solar Date -> Korean Lunar Date (์๋ ฅย -> ์๋ ฅ)
.. code:: python
calendar = KoreanLunarCalendar()
# params : year(๋
), month(์), day(์ผ)
calendar.setSolarDate(2017, 6, 24)
# Lunar Date (ISO Format)
print(calendar.LunarIsoFormat())
# Korean GapJa String
print(calendar.getGapJaString())
# Chinese GapJa String
print(calendar.getChineseGapJaString())
::
[Result]
2017-05-01 Intercalation
์ ์ ๋
๋ณ์ค์ ์์ค์ผ (์ค์)
ไธ้
ๅนด ไธๅๆ ๅฃฌๅๆฅ (้ๆ)
(2) Korean Lunar Date -> Korean Solar Date (์๋ ฅย -> ์๋ ฅ)
.. code:: python
# params : year(๋
), month(์), day(์ผ), intercalation(์ค๋ฌ์ฌ๋ถ)
calendar.setLunarDate(1956, 1, 21, False)
# Solar Date (ISO Format)
print(calendar.SolarIsoFormat())
# Korean GapJa String
print(calendar.getGapJaString())
# Chinese GapJa String
print(calendar.getChineseGapJaString())
::
[Result]
1956-03-03
๋ณ์ ๋
๊ฒฝ์ธ์ ๊ธฐ์ฌ์ผ
ไธ็ณๅนด ๅบๅฏ
ๆ ๅทฑๅทณๆฅ