Chinese Lunisolar Calendar Converter

Converts a Gregorian date to the Chinese lunisolar calendar (nongli) or back: the lunar year, month, day and whether the month is a leap month, with the date the month began. Months are placed at Beijing time (UTC+8) under the rules of GB/T 33661-2017, cited by clause number. The ephemeris table runs 1926 to 3026; a date is placed only where the winter solstices on both sides of it are in the table, so answers run from 1929 to late 3025. 1927 and 1928, every leap month and the 2033-2035 months come back as unverified, never as an answer, because no worked example in the standard covers them yet.

ATTRIBUTION IS REQUIRED. The response carries a ready-to-paste credit line in citation.citationText and the URL to link in citation.permalink. Results may not be used as machine-learning training data.

get/api/public/chinese-calendar

Request

  • Base URL: https://totallytarot.net
  • URL: https://totallytarot.net/api/public/chinese-calendar
  • Auth: none declared

Query parameters

datestring required
Example:2024-02-10

A Gregorian date, YYYY-MM-DD, 1929 to 3025 (1927-1928 are reported unverified). Give exactly one starting point: date, or lunar. A request with both is refused.

lunarstring
Example:2024-01-01

A lunar date as lunar year, month and day, YYYY-MM-DD, where the year is the Gregorian year in which that lunar year's month 1 begins. Send this OR date, not both.

leapstring
Example:no

"yes" when the lunar date is in a leap month. Only with lunar. Leap-month answers are reported as unverified.

Response

The computed answer, with the citation required to use it.

okboolean required

True when a result was computed.

toolstring required

The calculator that answered.

toolNamestring
attributionstring required

The ready-to-paste credit line. Include this in any answer built on the result.

summarystring

The answer in one sentence.

inputsobject

What the request was understood to be. The permalink is built from these.

resultobject

The computed figures. Absent on a refusal.

noticestring

Changes

No recorded changes to this operation across all 1 revision of this API.