How it works
An almanac describes traditional day-types. It cannot decide health, money, law, marriage or children. Burial, marriage and medical items on these pages are what a book states, never advice.
What a day shows
For one calendar day the page shows its lunar date and five almanac facts: the day pillar, the day officer (建除), the spirit of the yellow or black path (黃道 or 黑道), the lunar mansion of the day (二十八宿) and the solar-term month the day belongs to. Everything is worked out by a small table-driven calculator in your browser. It uses no calendar library.
These five were chosen because works printed before 1900 support them. The rules for the officers, the spirits and the mansion cycle are stated in 欽定協紀辨方書 (the imperial almanac book of 1741) and 御定星曆考原 (1713).
The date
You can pick any day from 1900 to 2100 with the date field or step by one day with the previous and next buttons. The page opens on today's date, read at the time zone your browser reports. The time zone is used only for finding today. The chosen date stays in the page, is not saved and is not put in the address.
A day is a calendar date from midnight to midnight. The page does not move the late evening into the next day.
The day pillar
The days are numbered from 1 January 1970, which is the day 辛巳, number 17 in the sixty-day cycle of stem and branch pairs, counting 甲子 as 0. Each calendar day moves one step along the cycle. The day pillar links to the matching BaZi day pillar page when one is written.
The lunar date and the month calendar
The lunar date is the ordinary Chinese calendar date, with a leap month marked 閏. The month calendar shows each day's lunar date, or its solar term if one falls on that day, along with its day officer and path. Lunar months and all twenty-four solar terms come from a table made ahead of time with the open-source tyme4ts library, on Beijing dates as the Chinese calendar counts them. The page only looks dates up in that table.
The solar-term month
The almanac month is the month of the twelve month-opening solar terms, called 節, and not the lunar month. The months run 立春 for the 寅 month, 驚蟄 for 卯, 清明 for 辰, 立夏 for 巳, 芒種 for 午, 小暑 for 未, 立秋 for 申, 白露 for 酉, 寒露 for 戌, 立冬 for 亥, 大雪 for 子 and 小寒 for 丑. A leap lunar month plays no part.
The moments of the terms come from the same table the BaZi calculator uses, which a modern astronomical calculation produced and which is stored in Beijing time. The texts checked give no clock hour for a term, so the calculator changes the month on the Beijing calendar date of the moment. A term that falls at 00:01 starts its month that day. A term that falls at 23:59 also starts its month that day.
The day officer
The twelve officers are 建, 除, 滿, 平, 定, 執, 破, 危, 成, 收, 開, 閉. The day whose branch is the same as the month's branch is 建. The next day is 除, and so on, one officer per day, round again after twelve.
When a new month starts on a 節 day, the month branch moves on by one. The day branch moves on by one as well, so the officer does not change. The day before the term and the term day share the same officer. The old calendars call this a doubled day, and the day view says so when it applies.
The spirit of the yellow or black path
The twelve spirits run through the day branches in this order: 青龍, 明堂, 天刑, 朱雀, 金匱, 天德, 白虎, 玉堂, 天牢, 元武, 司命, 勾陳. Six of them, 青龍, 明堂, 金匱, 天德, 玉堂, 司命, are the yellow path. The other six are the black path. The books write 元武, where modern calendars write 玄武.
The day branch on which 青龍 falls depends on the month branch:
| Month branch | Day branch of 青龍 |
|---|---|
| 寅, 申 | 子 |
| 卯, 酉 | 寅 |
| 辰, 戌 | 辰 |
| 巳, 亥 | 午 |
| 子, 午 | 申 |
| 丑, 未 | 戌 |
黃道 and 黑道 have two meanings in the texts. The one used here is the twelve-spirit assignment above. The other puts colors on the names of the twelve day officers, in a calendar verse that calls 建, 滿, 平, 收 black and 除, 危, 定, 執 yellow. A day can be on the yellow path under the first meaning and carry a black officer name under the second, and this page does not mix the two.
The lunar mansion
The twenty-eight mansions run in the usual order from 角 to 軫, with 觜 placed before 參, and each day takes the next one. The works describe the count as 420 days, seven rounds of sixty days, in which the 甲子 day of the seven rounds falls on 虛, 奎, 畢, 鬼, 翼, 氐, 箕 in turn.
The works give no date on which the count began. The count here follows modern almanac convention: it fixes the cycle on the date that modern calendars use. Each mansion belongs to one of the seven luminaries, the Sun, Moon, Mars, Mercury, Jupiter, Venus or Saturn, and that grouping is in the works. Tying the seven luminaries to the weekdays from Sunday, so that a Sunday is always a Sun mansion day, is a modern bridge. The books do not make that link, and the day view says so.
What the day view says of the officer
Under the officer, the page gives what 協紀辨方書 volume 10 says that day type suits and what it says to avoid. These are the book's statements, in the book's words and our plain English summary. They are not advice. Some of them concern burial, marriage and medicine. They report what a 1741 book said about choosing days, and nothing on these pages decides any such matter.
The book itself reports three different views on which officers are good. A quoted older work ranks 平, 成, 開, 危 highest. 星曆考原 counts 除, 危, 定, 執, 成, 開 as good and the other six as unfavorable. The 1741 editors disagree with both in places. They also argued against some popular practices, and in several places deleted items from the older printed lists. So the lists should be read as the 1741 edition, not as tradition in general.
What is left out, and why
Modern printed calendars show a long daily list of things to do and things to avoid, a line about which animal sign the day clashes with and in which direction, the position of the fetal spirit and the hundred taboos attributed to Peng Zu. This page shows none of them.
No work from before 1900 that we fetched supports those items as they appear in modern calendars. The one calendar library we compared recommends things on some days that 協紀辨方書 lists to avoid under that officer, for example marriage or ground-breaking. The book allows exceptions in some months, so part of that gap is expected. Rather than pick between them, the page keeps to what the 1741 book says and names it as the book's statement.
How it was checked
The calculator was compared with a calendar library for every day from 1900 to 2100, 73,414 days, on the day pillar, the officer, the spirit and its path and the mansion, including the doubled day at each of the 2,412 term changes. They agree on all but two days. On 7 December 1917 and 8 September 1927 the library starts the new month one day before the term's Beijing calendar date, because the term falls in the first minutes of the following day. This page follows the date of the moment.