lunardate
A Chinese Calendar Library in Pure Python
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no dependencies, installs easily, and solves a specific problem with no known vulnerabilities. The copyleft license is a consideration for proprietary projects, but the library is well-suited for open-source or GPL-compatible applications needing Chinese calendar support.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Supports only Chinese calendar years 1900–2099; dates outside this range will not convert correctly.
- Low friction installation with no runtime dependencies.
- Actively maintained as of 2026-07-07 with recent release (38 days old).
License · maintenance · safety
GPL-3.0-or-later (copyleft) — GPL-3.0-or-later copyleft license requires derivative works and distributions to be licensed under GPL-3.0 or later; suitable for open-source projects but may restrict commercial use.
last release 2026-07-07 (38 days) · last repo commit 2026-07-07 · 74 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,707,783 downloads/mo, #3,632 on PyPI
Alternatives
Verify before relying
pip install lunardate
from lunardate import LunarDate
import datetime
# Convert Gregorian to lunar
lunar = LunarDate.from_solar_date(1976, 10, 1)
print(lunar) # LunarDate(1976, 8, 8, 1)
# Convert lunar back to Gregorian
solar = lunar.to_solar_date()
print(solar) # datetime.date(1976, 10, 1)
# Date arithmetic
ld = LunarDate(1976, 8, 8)
td = datetime.timedelta(days=10)
result = ld + td
print(result) # LunarDate(1976, 8, 18, 0)- Whether the year range 1900–2099 in the Chinese calendar aligns with common use cases or if users need support outside this window.
- Performance characteristics when performing bulk date conversions or arithmetic on large date ranges.
What it is and what it does
Lunardate is a pure-Python library for working with the Chinese calendar system. It provides bidirectional conversion between Gregorian dates and Chinese lunar dates, including support for leap months, and implements date arithmetic (addition and subtraction with timedeltas) and comparison operations. The library has no external runtime dependencies and works with Python 3.7 and later.
The package is designed for applications that need to handle Chinese calendar dates—such as scheduling systems, cultural event planning, or historical date tracking. It exposes a LunarDate class with methods to convert from solar dates, retrieve date components (year, month, day, leap-month status), and perform standard date operations. The implementation is limited to the Chinese calendar years 1900–2099.
Use it for
- Convert Gregorian dates to Chinese lunar dates for cultural event scheduling or holiday calculations.
- Build calendar applications or date pickers that display both solar and lunar dates for Chinese-speaking users.
- Calculate date differences and perform arithmetic on lunar dates for historical or astrological analysis.
- Determine leap months in the Chinese calendar for a given year to handle calendar irregularities.
- Integrate lunar date support into internationalization or localization workflows for Chinese markets.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no dependencies, installs easily, and solves a specific problem with no known vulnerabilities. The copyleft license is a consideration for proprietary projects, but the library is well-suited for open-source or GPL-compatible applications needing Chinese calendar support.
Install
lunardate on PyPI
Before you install
Low friction installation with no runtime dependencies. Actively maintained as of 2026-07-07 with recent release (38 days old).
Supports only Chinese calendar years 1900–2099; dates outside this range will not convert correctly.
License in practice
GPL-3.0-or-later copyleft license requires derivative works and distributions to be licensed under GPL-3.0 or later; suitable for open-source projects but may restrict commercial use.
Quickstart
pip install lunardate
from lunardate import LunarDate
import datetime
# Convert Gregorian to lunar
lunar = LunarDate.from_solar_date(1976, 10, 1)
print(lunar) # LunarDate(1976, 8, 8, 1)
# Convert lunar back to Gregorian
solar = lunar.to_solar_date()
print(solar) # datetime.date(1976, 10, 1)
# Date arithmetic
ld = LunarDate(1976, 8, 8)
td = datetime.timedelta(days=10)
result = ld + td
print(result) # LunarDate(1976, 8, 18, 0)
Verify before relying
- Whether the year range 1900–2099 in the Chinese calendar aligns with common use cases or if users need support outside this window.
- Performance characteristics when performing bulk date conversions or arithmetic on large date ranges.
Package facts
| License | GPL-3.0-or-later copyleft |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 38 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,707,783 / month, #3,632 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules |
Evidence: lunardate-0.3.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “lunar date gregorian”
- lunardateConverts between Gregorian (solar) and Chinese (lunar) calendar…
- zhdateConverts between Chinese lunar calendar dates and Gregorian datetime…
- sxtwlConverts between solar (Gregorian) and lunar calendars, computes…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also korean-lunar-calendar · lunar_python · LunarCalendar · sxtwl · zhdate · datedelta · chinese-calendar · jdcal · convertdate · bangla