Skip to main content

한국 양음력 변환

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)

한국 양음력 변환 (한국천문연구원 기준) - 네트워크 연결 불필요

음력 변환은 1391년 1월 1일 부터 2050년 11월 18일까지 지원

Gregorian calendar (1391. 2. 5. ~ 2050. 12. 31) <--> Korean lunar-calendar (1391. 1. 1. ~ 2050. 11. 18)

Install

pip install korean_lunar_calendar

To use

  1. import module

    from korean_lunar_calendar import KoreanLunarCalendar
  2. Korean Solar Date -> Korean Lunar Date (양력 -> 음력)

    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
정유년 병오월 임오일 (윤월)
丁酉年 丙午月 壬午日 (閏月)
  1. Korean Lunar Date -> Korean Solar Date (음력 -> 양력)

    # 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
병신년 경인월 기사일
丙申年 庚寅月 己巳日

Metadata

Release files for korean-lunar-calendar 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for korean-lunar-calendar 0.2.0
File Interpreter ABI Platform
korean_lunar_calendar-0.2.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Release files / korean_lunar_calendar-0.2.0-py2.py3-none-any.whl

Download URL korean_lunar_calendar-0.2.0-py2.py3-none-any.whl
Size 7.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
dd2583f47ea22d9d104db694c9e8b48e742dba078256838a6ddb12f19b892c87
BLAKE2b-256 checksum
How to use checksums
796126aaa1bfb3301dc2e979a0cf4431bb94d27f77147ff3d8decf8c3d8f785b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.8.0b1

Release history Release notifications | RSS feed

0.4.0

2 release files

0.3.1

2 release files

0.2.1

2 release files

This release

0.2.0 This release

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page