LunarCalendar
A lunar calendar converter, including a number of lunar and solar holidays, mainly from China.
What it is and what it does
LunarCalendar is a bidirectional converter between lunar and solar calendar systems, primarily designed for Chinese, Korean, Japanese, and Vietnamese calendars. It converts dates in both directions and provides a built-in festival database covering lunar holidays (Chinese New Year, Mid-Autumn Festival, Dragon Boat Festival), solar holidays with variable dates (Mother's Day, Easter), and 24 solar terms. The package validates date legality (e.g., detecting invalid leap months) and supports both simplified and traditional Chinese language output.
The library covers a fixed time range of 1900 to 2100 and depends on python-dateutil, ephem, and pytz for date arithmetic and astronomical calculations. It includes a console command (lunar-find) for quick festival lookups and is designed to be extended with additional festivals and languages through modification of its festival module.
Use it for:
- Convert a Gregorian date to its lunar calendar equivalent for display in Chinese cultural applications.
- Find the solar date of a lunar festival (e.g., Chinese New Year) for a given year.
- Look up the date of a solar term (e.g., Spring Equinox) using the lunar-find command.
- Validate whether a given lunar date is legal before storing or processing it in a calendar system.
- Generate festival calendars for Chinese, Korean, Japanese, or Vietnamese audiences in their native languages.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts between lunar and solar calendar dates, and provides access to lunar and solar festivals (including Chinese New Year, Mid-Autumn Festival, Easter, and 24 solar terms) for dates between 1900 and 2100.
Yes, if you need lunar-solar conversion and festival data for dates between 1900 and 2100 and can tolerate dormant maintenance. The package is stable, has no known vulnerabilities, installs easily, and covers a common use case well. Not recommended if you require active maintenance, support for dates outside the 1900–2100 range, or frequent updates to festival definitions.
Install
lunarcalendar on PyPI
pip
pip install lunarcalendaruv
uv add lunarcalendarpoetry
poetry add lunarcalendarInstalling LunarCalendar
Before you install
Low install friction; pure Python wheel with three lightweight runtime dependencies (python-dateutil, ephem, pytz). Dormant maintenance status since June 2018, though the repository remains active with a recent commit in May 2024.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
from lunarcalendar import Converter, Solar, Lunar
solar = Solar(2018, 1, 1)
lunar = Converter.Solar2Lunar(solar)
print(lunar)
Verify before relying
- Whether the 1900–2100 range and embedded festival data are sufficient for your use case without manual extension.
- Whether the dormant maintenance status (no releases since June 2018) poses a risk for your project's long-term compatibility.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=2.7, <4) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — python-dateutil, ephem, pytz |
| Maintenance | dormant — 2,984 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 707,326/month — #5,267 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: LunarCalendar-0.0.9-py2.py3-none-any.whl
Keywords: lunar calendar, festival, Chinese festivals, 24 solar terms, solar calendar, lunar solar converter, lunisolar calendar
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
lunardateConverts between Gregorian (solar) and Chinese…
copyleft · top 5,000 on PyPI
lunar_pythonConverts between Gregorian (solar) and Chinese…
permissive · top 15,000 on PyPI
korean-lunar-calendarConverts dates between the Korean lunar…
permissive · top 5,000 on PyPI
zhdateConverts between Chinese lunar calendar dates…
copyleft · top 15,000 on PyPI
sxtwlConverts between solar (Gregorian) and lunar…
permissive · top 15,000 on PyPI
chinese-calendarDetermines whether a specific date in China is…
permissive · top 15,000 on PyPI
yearfracComputes fractional year differences between…
permissive · top 15,000 on PyPI
convertdateConverts dates between the Gregorian calendar…
permissive · top 5,000 on PyPI
banglaConverts Gregorian dates to the Bengali…
permissive · top 15,000 on PyPI
fiscalyearProvides fiscal year, quarter, month, and day…
permissive · top 15,000 on PyPI