Calculate Bazi Chart
calculate_bazi_chartCalculate a deterministic Bazi chart with True Solar Time correction, Day Master, and Da Yun cycles, ensuring accurate fortune analysis without hallucinated calendrical data.
Instructions
Calculate a deterministic OpenFate Bazi/Four Pillars chart with True Solar Time correction, Day Master, Da Yun cycles, and branch interactions. For best accuracy, pass longitude plus timezone or timezoneId.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | Yes | Birth year. Use the lunar year when calendarType is lunar. | |
| month | Yes | Birth month, 1-12. | |
| day | Yes | Birth day, 1-31. | |
| hour | No | Birth hour in local civil time, 0-23. Omit when birth time is unknown. | |
| minute | No | Birth minute in local civil time. | |
| gender | Yes | Birth gender used for Da Yun direction. | |
| longitude | No | Birthplace longitude in decimal degrees. Enables true solar time correction. | |
| timezone | No | UTC offset in hours for the birth clock time, such as 8 for China or -5 for US Eastern Standard Time. | |
| timezoneId | No | Optional IANA timezone ID, such as Asia/Shanghai or America/New_York. | |
| dstOffset | No | Daylight saving offset in hours to remove from civil clock time. Use 1 for one-hour DST. | |
| calendarType | No | Input calendar type. | solar |
| isLeapMonth | No | Whether the lunar input month is a leap month. Used only when calendarType is lunar. | |
| enableTrueSolarTime | No | Apply true solar time when longitude and timezone data are available. | |
| dayBoundaryMode | No | Day-change rule. ZI_HOUR_23 means 23:00 starts the next day pillar. | ZI_HOUR_23 |