Convert lunar and Gregorian dates - Chinese lunisolar calendar API
post_chinese_astrology_calendar_lunar_dateConvert a Gregorian date to the Chinese lunisolar calendar or convert a lunar date back, in one endpoint. The calendar is computed at the UTC+8 reference meridian with the month containing the winter solstice fixed as month 11 and the leap month placed as the first month of the cycle carrying no major solar term, so a lunar date is the same worldwide rather than shifting with the caller timezone. The response reports the length of the lunar month, whether the date sits in a leap month, and which month the year doubles if any. Built for festival calendars, birthday features that follow the lunar date, and any app that has to survive a leap month without shifting every date after it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Gregorian date to convert to the lunisolar calendar. Send this OR the lunar fields, never both. | |
| lang | No | Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English. | en |
| compact | No | Set true for the same data in a compact shape: arrays of same-shaped objects arrive columnar as {"__cols":[names],"__rows":[[values]]}. Lossless, typically 40 to 52 percent fewer tokens. | |
| lunarDay | No | Day of the lunar month, 1 to 30. Requires lunarYear and lunarMonth. | |
| lunarYear | No | Lunisolar year to convert back to a Gregorian date. Requires lunarMonth and lunarDay. | |
| lunarMonth | No | Lunar month, 1 to 12. Requires lunarYear and lunarDay. | |
| isLeapMonth | No | Set true to address the leap repetition of lunarMonth rather than the first pass. Requesting a leap month a year does not have returns 400. |