Chinese
These operations measure the Sun and Moon directly and do not read a stored table. They return the structure of a chart and leave the reading to you.
The four pillars
- Year: it turns at Li Chun, the moment the Sun reaches 315°, not at Lunar New Year.
- Month: it turns at each jie, every 30° of the Sun from Li Chun. The stem follows the Five Tigers rule.
- Day: it counts on the sixty-day cycle. 1 October 1949 is Jia Zi.
- Hour: there are twelve double hours, starting at 23:00. The stem follows the Five Rats rule.
Each pillar returns its hidden stems, ten gods relative to the day master, and nayin. elements counts the visible stems and branches separately from the hidden stems.
We don't return day-master strength, useful gods or a reading, because schools disagree on them and they need interpretation that we have not had reviewed.
Conventions you choose
| Option | Values | Effect |
|---|---|---|
time_basis |
clock (default), true_solar |
True solar time corrects for longitude and the equation of time. It changes the hour pillar, and sometimes the day. |
zi_convention |
day_changes_at_23 (default), late_zi |
From 23:00, the first moves the day pillar to the next day. The second keeps the day and takes only the hour stem from the next day. |
These defaults are our choice, and schools differ. The response states which were used. Compare results from another calculator only with the same settings.
Luck pillars
The direction is forward for a male born in a yang-stem year or a female born in a yin-stem year, and backward otherwise. This is the traditional rule, and it needs gender, which we use for the response and do not store. Each three days from birth to the jie count as one year of the starting age.
Calendar
Month 11 holds the winter solstice. Months start on the day of the new moon in China's time, which is UTC+8 from 1929 and Beijing mean time before. When 13 months fall between two months 11, the first one without a zhongqi is the leap month. Dates run from 1901 to 2100.
/v1/chinese/zodiac returns the birth animal by both Li Chun and Lunar New Year, because people born between the two get different answers.
Relations
/v1/chinese/compatibility and /v1/chinese/annual list six harmonies, three harmonies, clashes, harm, punishment, destruction, and stem combinations and clashes. Compatibility counts the harmonies and conflicts on the year and day pillars. It gives no percentage, because the classical rules do not give one. Which pillars to compare is our choice, so the response labels it a convention.
How it was checked
- Chinese New Year on all 31 dates from 2000 to 2030, against Wikibooks' list. For 2030 that list says 2 February, while other calendars and our calculation say 3 February.
- Leap months in 2017 and 2020, as Wikipedia's Chinese calendar article names them.
- The day cycle against Wikipedia's worked example, and the year pillars against its table.
- Solar terms at the equinoxes and solstices against the ephemeris library's
Seasons. - The Five Tigers and Five Rats rules, ten gods and relations, typed separately in the tests.
The hidden stems and nayin tables are the common ones, but we have not checked them against a named classical edition.
Language
Set options.lang to hi for Hindi animal and element names. Stems, branches, ten gods and nayin stay in Chinese and English.