Compute a Bazi (Four Pillars) chart
compute_bazi_chartCompute a complete Chinese Bazi chart from birth date, time, and place, applying True Solar Time and daylight-saving corrections to deliver Four Pillars, Ten Gods, and luck pillars for destiny analysis.
Instructions
Compute a full Chinese Bazi (八字, Four Pillars of Destiny) chart from a birth date, time, and place. Returns the four pillars, Day Master, Ten Gods, Hidden Stems, Five Elements, Na Yin, Growth Stages, Shen Sha, branch relations, Luck Pillars, and the current year, computed with True Solar Time and historical daylight-saving handling. Provide a birth city (use search_cities to resolve it) for accurate true solar time, or pass longitude and utcOffset directly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| day | Yes | Birth day 1-31 | |
| city | No | Birth city name, e.g. 'Taipei' or 'New York'. Resolved to longitude and IANA time zone for true solar time. Use search_cities first if unsure. | |
| hour | No | Birth hour 0-23 (local clock time as recorded) | |
| year | Yes | Birth year, e.g. 1990 | |
| month | Yes | Birth month 1-12 | |
| gender | Yes | Needed for the luck-pillar direction | |
| minute | No | Birth minute 0-59 | |
| dayRule | No | When a new day begins: 23:00 Zi hour (default) or midnight | zi23 |
| yearRule | No | Year boundary: Li Chun (default) or Lunar New Year | lichun |
| longitude | No | Birth longitude in degrees East (negative = West). Use instead of city. | |
| utcOffset | No | UTC offset in hours (e.g. 8 for China). Use with longitude when no city is given. | |
| timeUnknown | No | True if the birth time is unknown; the hour pillar is then tentative | |
| trueSolarTime | No | Apply true-solar-time correction (recommended) |