How we calculate
The calendar follows the 欽定協紀辨方書 Qīndìng Xiéjì Biànfāng Shū (“Imperial Book for Harmonizing the Times and Distinguishing the Directions”), the 1741 treatise on date selection, and compares it with two popular almanacs still in use today: the 象吉通書 Xiàngjí Tōngshū (“Almanac of Auspicious Signs”) and the 鰲頭通書 Áotóu Tōngshū (“Almanac of the Turtle's Head”).
The day and the time zone
The day starts at midnight in your time zone: the same solar term can fall on December 21 in Rome and on December 22 in Beijing, and the calendar changes accordingly. The lunar date follows your time zone too. The official Chinese calendar and the Tong Shu calculate it on Beijing time, and in some months the new moon falls on a different day there: in the time zone panel you can choose to count it as in China.
The solar month
The months of date selection are neither those of the civil calendar nor the lunar ones: they begin with the twelve “nodes” (節 jié) of the solar year, from 立春 Lìchūn (“Start of Spring”), around February 4. On the day of the node the Officer repeats that of the day before, as the classical rule requires.
The class of the day
The class comes from the Officer: Stable, Initiate, Success and Open are favorable; Establish, Full, Balance and Receive neutral; Remove, Destruction, Danger and Close unfavorable. The eves of the season starts, of the equinoxes and solstices, and the days of the year breaker (歲破 suìpò) are unfavorable in any case.
This is the popular classification, the one of the Tong Shu (通書 Tōngshū, “almanac”) and of the calendars in circulation today. The 協紀 Xiéjì (“Harmonizing the Times”, the 1741 treatise) reports others: for the 星歷考原 Xīnglì Kǎoyuán (“Inquiry into the Origins of Stars and Calendar”) Remove and Danger are good too, while Establish, Full, Balance and Receive are bad. The cards of the Officers say where the sources are divided.
The day star
It changes direction on the day of the solstice. The series starts from the first 甲子 jiǎzǐ day (yang Wood stem, Rat branch) after the solstice, the day that opens the sixty-day cycle: in summer it is 9, in winter 1. This is the Tong Shu rule, and not all schools follow it.
The Da Gua hexagrams
In the 玄空大卦 Xuánkōng Dàguà (“great hexagrams of the mysterious void”) method each pillar corresponds to a hexagram. The sixty pillars, taken in the order of the sixty dragons of the compass (透地六十龍 tòudì liùshí lóng, “the sixty dragons that pass through the earth”), run around Fu Xi's circle of Early Heaven and skip four hexagrams: 復 Fù (“Return”), 姤 Gòu (“Coming to Meet”), 革 Gé (“Revolution”) and 蒙 Méng (“Youthful Folly”). The element comes from the number of the upper trigram, the period from the lines that change between the two trigrams. We have not yet found the rule written in an ancient text: we reconstructed it from the Tong Shu, with which it matches on all sixty pillars.