{"id":1842,"library":"korean-lunar-calendar","title":"Korean Lunar Calendar","description":"This Python library provides functionalities to convert between the Gregorian (solar) calendar and the Korean lunisolar calendar, adhering to the standards of the Korea Astronomy and Space Science Institute (KASI). It supports a date range from 1000-01-01 to 2050-11-18 for lunar dates and 1000-02-13 to 2050-12-31 for solar dates. The current version is 0.3.1.","status":"active","version":"0.3.1","language":"en","source_language":"en","source_url":"https://github.com/usingsky/korean_lunar_calendar_py","tags":["calendar","lunar-calendar","korean","date-conversion","lunisolar"],"install":[{"cmd":"pip install korean-lunar-calendar","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"symbol":"KoreanLunarCalendar","correct":"from korean_lunar_calendar import KoreanLunarCalendar"}],"quickstart":{"code":"from korean_lunar_calendar import KoreanLunarCalendar\n\ncalendar = KoreanLunarCalendar()\n\n# Convert Solar (Gregorian) to Lunar\ncalendar.setSolarDate(2017, 6, 24)\nlunar_date = calendar.getLunarCalendar()\nprint(f\"Solar 2017-06-24 is Lunar: {lunar_date['year']}-{lunar_date['month']}-{lunar_date['day']} (Intercalation: {lunar_date['intercalation']})\")\n\nkorean_gapja = calendar.getKoreanGapja()\nprint(f\"Korean GapJa: {korean_gapja['year']} {korean_gapja['month']} {korean_gapja['day']} (Intercalation: {korean_gapja['intercalation']})\")\n\n# Convert Lunar to Solar\ncalendar.setLunarDate(1956, 1, 21, False) # year, month, day, is_intercalary (윤달여부)\nsolar_date = calendar.getSolarCalendar()\nprint(f\"Lunar 1956-01-21 (not intercalary) is Solar: {solar_date['year']}-{solar_date['month']}-{solar_date['day']}\")","lang":"python","description":"Initialize the calendar, then use `setSolarDate` or `setLunarDate` to perform conversions and retrieve results using `getLunarCalendar`, `getSolarCalendar`, `getKoreanGapja`, or `getChineseGapja`."},"warnings":[{"fix":"Ensure input dates fall within the supported range (1000 to 2050).","message":"The library has a defined date range for conversions: lunar dates (1000-01-01 to 2050-11-18) and solar dates (1000-02-13 to 2050-12-31). Dates outside this range will cause validation methods to return `False`.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Be aware that results may not align with Chinese lunar calendar calculations. This library is specific to the Korean system.","message":"The Korean lunisolar calendar can differ from the Chinese lunar calendar by a day or even a month due to time zone differences and calculation methods. This library strictly adheres to Korean Astronomical standards.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always provide the correct `intercalation` boolean parameter when calling `setLunarDate` to ensure accurate conversions.","message":"When setting a lunar date using `setLunarDate`, you must explicitly specify if the month is intercalary (윤달, `intercalation=True`) or not (`intercalation=False`). Incorrectly setting this boolean will lead to wrong conversion results.","severity":"gotcha","affected_versions":"All versions"},{"fix":"For production systems, monitor releases for potential breaking changes. Consider pinning exact versions to mitigate unexpected updates.","message":"The project is currently classified as 'Development Status :: 3 - Alpha' on PyPI. While functional, this status suggests that the API may not be entirely stable, and breaking changes or significant modifications could occur in future minor versions.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}