Skip to main content

Korean Lunar Calendar

Project description

한국 양음력 변환

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

korean_lunar_calendar-0.2.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

korean_lunar_calendar-0.2.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file korean_lunar_calendar-0.2.1.tar.gz.

File metadata

  • Download URL: korean_lunar_calendar-0.2.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

File hashes

Hashes for korean_lunar_calendar-0.2.1.tar.gz
Algorithm Hash digest
SHA256 12ce54b1392ed45a82dc6cea85ee5f7e33630556e82488f57e37a22482c8275d
MD5 1fda622625f7b0d6843eb0465a128fca
BLAKE2b-256 fac42f0f2329098ee24f629c3ad4dcb210fbedb52e51fa6348ebdcbd7af2151b

See more details on using hashes here.

File details

Details for the file korean_lunar_calendar-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: korean_lunar_calendar-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

File hashes

Hashes for korean_lunar_calendar-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a619ea88610129019267467b85cc9faf0fab6e1694b2e782d1aeb610cdd382d5
MD5 edb2dac6d6d710fab5cd8ca07d5b81ba
BLAKE2b-256 1541aa426a4a9141afd8e7f5c8312bb59d5693274f3f7b34e73bdce4ee48b4c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page