SuperAPI AI Directory

calendar-api

General & other

View repository

Updated 10-16 09:05

About this skill

Chinese Calendar Query

Queries the Interface Box API (API ID: 278) to retrieve comprehensive traditional Chinese calendar (Huangli) information for any date.

Execution Rule

Run the user's requested command directly without pre-checking dependencies, environment variables, or configuration. If something is wrong, the script will fail with a clear error — check and fix only then.

Environment Variables

Variable Description
JKHZ_ID Interface Box (apihz.cn) user ID
JKHZ_KEY Interface Box API key

The script loads these from scripts/.env automatically. See scripts/.env.example for the template.

Requirements

pip install python-dotenv tzdata

Usage

Script: scripts/getzdday.py

Query today

python scripts/getzdday.py

Query a specific date

python scripts/getzdday.py 2025-06-05

Output raw JSON (debugging)

python scripts/getzdday.py 2025-06-05 --json

Output Categories

The script organizes returned data into these categories:

Category Fields
📆 Gregorian Calendar Year, month, day, weekday, leap year
🌙 Lunar Calendar Lunar year, month, day
🎊 Festivals Solar festivals, lunar festivals
⭐ Constellation & Zodiac Constellation, Chinese zodiac, daily zodiac
📜 Stems & Branches Year/month/day Ganzhi, day Nayin
🌿 Solar Terms & Phenology Solar term, description, Wuhou, Shujiu, Sanfu
☯ Auspicious/Inauspicious Yi (suitable), Ji (avoid), auspicious/inauspicious gods
🧭 Directions Xi (joy), Cai (wealth), Fu (fortune), Gui (noble) spirit directions
⚠️ Clash & Sha Xiangchong, Richtungschong, Tian Shen, Huang/Hei Dao
🔢 Star & Spirit Zhi Xing (12 value stars), 12 spirits, Liuyao, moon phase
🌟 Mansions 28 mansions, animal, luck, 7 luminaries, 4 palaces, 4 symbols
📖 Peng Zu & Fetal God Peng Zu's hundred taboos, fetal god direction, Taisui
📅 Buddhist/Taoist Calendar Buddhist calendar, Taoist calendar, Islamic calendar
📊 Other Wuxing (5 elements), Julian day, 9 stars, season

Notes

  • Defaults to today's date (Asia/Shanghai timezone)
  • API year range: 1800 to next year
  • Formatted output is suitable for direct display; --json for debugging
  • The API may return different fields per date; the script dynamically displays all non-empty fields
  • Match the user's language. The output language MUST match the language of the user's question. If the user asks in Chinese, output all category labels and descriptions in Chinese; if in English, output in English.