排八字 · Bazi chart
bazi_chartCalculate a full Bazi chart using the Xiaodao engine: four pillars and details, lunar date, auxiliary palaces, month command, luck start and direction, all twelve ten-year cycles with yearly lists, and focused annual/monthly/daily/hourly facts. The default focus is the chart page current instant at the birth place, using its historical time zone and true-solar day boundaries. focusDate selects a local civil date at noon; detailYears {from,to} adds up to ten inclusive years; allDaysOfMonth adds every day of the focused solar-term month. Ranges must fit the pre-luck and twelve-cycle timeline. Months run from Lichun (Yin) through the following Xiaohan (Chou). Year/month pillars compare the actual instant with solar terms; day/hour pillars use true solar time. earlyLateZi defaults to false (23:00 day change); true uses midnight and separates early/late Zi hours. Luck starts from the birth-to-term interval (3 days per year), forward for yang-year males/yin-year females, reverse otherwise. Input is historical wall-clock time, Gregorian or explicit lunar/leap-month date. Repeated times require a user-selected occurrence; nonexistent times are not calculated. Missing birth boundary choices return needs_input. Chart text stays Chinese; English adds a field glossary. This returns chart facts, not an interpretation. Gregorian date range: 1801-01-01 through 2099-12-31. 公历日期范围:1801-01-01 至 2099-12-31。 Lunar input is checked after conversion to Gregorian. 农历输入先换成公历再查。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sex | Yes | ||
| date | Yes | Birth date, YYYY-MM-DD, in the selected calendar. | |
| time | Yes | Local wall-clock time, HH:MM. | |
| placeId | Yes | Birth place ID returned by search_birth_place. | |
| calendar | No | Gregorian (SOLAR) or Chinese lunar (LUNAR) input. Lunar input requires an explicit isLeapMonth. | SOLAR |
| language | No | en | |
| focusDate | No | Local civil date at the birth place, evaluated at noon; defaults to the current chart-page instant. Must fall within the supported timeline. | |
| detailYears | No | Inclusive calendar-year containers to include in detail, at most ten years, within the supported timeline. | |
| earlyLateZi | No | Optional Zi-hour convention. Default false: the day changes at 23:00 true solar time (same as the Xiaodao website default). true keeps the same day until 00:00. | |
| isLeapMonth | No | Required for LUNAR input: whether the supplied lunar month is a leap month. | |
| allDaysOfMonth | No | Include all days of the focused solar-term month, including partial boundary days. | |
| daylightSaving | No | Only supply a user-selected DST choice when the local time occurs twice. | |
| boundaryChoices | No | User choices for returned time boundaries: SAME uses this time; OTHER uses the other side. |