Misc

Query Lunar Calendar Time

0calls
Free

Need the lunar-calendar information for a specific timestamp in a given time zone? This endpoint returns the full result directly.

Overview

Accepts a Unix timestamp (seconds or milliseconds) plus an IANA time-zone name and returns the Gregorian time, weekday, lunar year/month/day, ganzhi (sexagenary cycle), Chinese zodiac, solar terms, and festivals. When ts is omitted the current time is used; when timezone is omitted Asia/Shanghai is used.

Time-zone notes

  • Standard IANA time zones such as Asia/Shanghai and Asia/Tokyo are supported.
  • Aliases such as Shanghai and Beijing are also accepted.
  • An invalid time zone returns 400 with invalid timezone: xxx.

Query parameters

ts
stringoptional

Unix timestamp. Both 10-digit (seconds) and 13-digit (milliseconds) formats are accepted. Defaults to the current time when omitted.

timezone
stringoptional

Time-zone name. Accepts IANA time zones (e.g. Asia/Shanghai) and aliases (Shanghai, Beijing). Defaults to Asia/Shanghai.

Response

200 / OK

Lookup succeeded. Returns the lunar-calendar information for the given time and zone.

JSON

400 / Bad Request

Invalid request. An invalid timezone returns invalid timezone: xxx; an invalid ts returns invalid timestamp: xxx.

JSON