Cast a Tu Vi birth chart
tuvi_chartUse this when someone wants their Tu Vi (Zi Wei Dou Shu, 紫微斗数) birth chart or its reading. Pass birth_date (solar, YYYY-MM-DD, 1921 to 2100), birth_time (local HH:MM, 24-hour) and gender. Optional: calendar (vi, the default, or zh), leap_month (split, same or next), late_zi (next_day or same_day for a 23:00 birth), topics. Returns the lunar date, the 12 palaces with the 14 main stars, 14 minor stars, the four transformations and the 10-year periods, in Vietnamese and Chinese, plus readings for births from 1950 to 2026 from an open CC BY dataset, each with citations to the classic 紫微斗数全书. Keep the attribution with any reading you repeat. Readings are cultural, not predictions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gender | Yes | Gender at birth; it sets the direction of the 10-year periods | |
| topics | No | Reading topics to return; all 13 when left out | |
| late_zi | No | A birth from 23:00 counts as the Tý hour of the next day (next_day, the common rule) or of the same day | next_day |
| calendar | No | Lunar calendar and tradition: vi is the Vietnamese calendar (UTC+7 from 1968, UTC+8 before) with Mệnh chủ by year branch; zh the Chinese one (UTC+8) with 命主 by Life-palace branch | vi |
| birth_date | Yes | Birth date on the solar (Gregorian) calendar, YYYY-MM-DD, from 1921 to 2100 | |
| birth_time | Yes | Local clock time of birth, HH:MM in 24-hour form. 23:00 to 00:59 is the Tý hour | |
| leap_month | No | A birth in a leap month counts as: split, the same month up to day 15 and the next month after it; same; or next | split |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chart | Yes | ||
| input | Yes | ||
| readings | Yes | ||
| disclaimer | Yes | ||
| attribution | Yes |