The Xieji Bianfang Shu: An Emperor's Attempt to End Almanac Chaos
By the 18th century, China's almanac traditions had splintered into contradictory regional systems. Emperor Qianlong ordered a fix. The result was the most rigorous editorial project in the history of Chinese date selection.
Part 4 of The Court Historian's Art — a series on how astronomy, record-keeping, and divination became one tradition.

The Problem of Many Almanacs
Here's something you need to picture. It's the 1730s. You're a merchant in Guangzhou planning a voyage. You consult your local almanac maker—a man whose family has been in the business for three generations—and he tells you the 14th of the third month is auspicious for travel. Fine. You write to your trading partner in Beijing, who consults his almanac, and gets the opposite answer. Not a slightly different answer. The opposite. One says go, the other says stay.
This wasn't a hypothetical embarrassment. It was the actual state of affairs across China by the early Qing dynasty. Centuries of accumulated almanac practice had produced dozens of competing lineages, each with its own rules for evaluating dates and directions. Some traditions weighted the Twelve Day Officers (建除十二神) most heavily. Others prioritized the lunar mansion system (二十八宿). Still others relied on folk heuristics that had drifted loose from any theoretical framework—rules passed from master to apprentice with the justification "this is how we've always done it."
The contradictions were not subtle. Two almanacs could agree on every astronomical fact—the same solar terms, the same stem-branch day—and still arrive at opposite evaluations for the same activity on the same date. The problem wasn't the astronomy. It was the interpretive layer: which rules applied, in what order, with what weight, and what happened when they conflicted.
The Imperial Intervention
In 1739, Emperor Qianlong (乾隆) ordered a solution. And "ordered" is the right word—this was not a scholarly proposal that worked its way up through the bureaucracy. It was an imperial decree, issued from the top. The emperor wanted a single, authoritative almanac compilation that would resolve the contradictions and establish a standard for the entire empire.
If this sounds familiar, it should. Eighteen hundred and forty-three years earlier, Emperor Wu of Han had issued a strikingly similar decree—the one that produced the Taichu calendar reform. The parallel is not coincidental. It's structural. Both interventions arose from the same constitutional logic: the state claims authority over how time is organized and interpreted. When that authority fragments—when different regions or lineages operate under different temporal rules—the state's legitimacy is compromised. The Taichu reform addressed a broken calendar. The Xieji project addressed a broken almanac tradition. Same impulse, different material.
The Compilers
Qianlong didn't hand the project to folk almanac practitioners. He gave it to court scholars with access to the imperial library. The lead editors were Prince Yunlu (允祿), a member of the imperial family with deep involvement in Qing scholarly projects; Mei Gu (梅榖), grandson of the great mathematician-astronomer Mei Wending (梅文鼎); and He Guozong (何國宗), an astronomer who had worked on the Qing dynasty's official calendar revisions.
These men were not practitioners in the field. They were editors, systematizers, evaluators—closer in function to the Grand Historian tradition than to the village date selector. Their job was to collect every extant almanac tradition, lay the competing rules side by side, test each one against the theoretical framework of stems, branches, and solar terms, and decide what to keep.
The project was housed under the Siku Quanshu (四庫全書) apparatus, the massive imperial library compilation that was arguably the largest editorial project in premodern world history. The Xieji Bianfang Shu became part of this collection—catalogued in the Siku Quanshu Zongmu Tiyao (四庫全書總目提要), which describes it as an effort to "discriminate the correct from the spurious" in almanac practice.
What They Rejected
Here's what people miss about the Xieji Bianfang Shu: the remarkable thing is not what it includes. It's what it throws out.
The compilers were explicit about their editorial method. When two rules contradicted each other, they didn't average them or list both with a shrug. They investigated. Which rule could be traced to a classical source? Which could be derived from the stem-branch framework? Which was simply folk custom with no theoretical justification? Rules that couldn't be justified were set aside. Rules that contradicted the core system were rejected outright.
This is closer to peer review than to folk compilation. The 36 volumes of the Xieji don't just present a system—they argue for it. The text regularly includes passages explaining why a particular rule was adopted and why a competing rule was rejected. The reasoning is transparent. You can disagree with the compilers' conclusions, but you can see exactly how they arrived at them.
The Draft History of Qing (清史稿) records this project alongside Qianlong's other major compilation efforts. But unlike many imperial vanity projects, the Xieji's authority didn't rest solely on the emperor's name. It rested on the method.
The Court Historian's Discipline, Applied to Almanacs
If you've been following this series, the pattern should be visible now. In Part 1, we saw how the Taichu reform standardized the calendar—the framework of solar terms, month-numbering, and intercalary rules that made everything else possible. In Part 2, we saw how the Grand Historian's role unified astronomy, record-keeping, and interpretation under a single discipline. The Xieji project is the same discipline applied to a different body of material.
Just as Sima Qian's job was to make the heavens legible, the Xieji compilers' job was to make the almanac tradition legible. Both involved collecting sources. Both involved evaluating competing claims. Both involved making editorial judgments about what was reliable and what was not. And both produced works that derived their authority not from imperial fiat alone, but from the rigor of the process.
Why It Actually Became the Standard
Plenty of imperial projects were ignored. An emperor could commission a text, stamp it with the imperial seal, and have it gather dust in a library. Authority by decree is brittle. The Xieji didn't just survive—it became the working reference for professional date selectors (择日师) across China, Taiwan, Hong Kong, and Southeast Asia. That happened because the methodology was sound.
Professional date selectors adopted the Xieji not because they were compelled to, but because it solved the problem they faced every day: conflicting rules with no clear way to adjudicate. The Xieji gave them a vetted, internally consistent system with transparent reasoning. The 蔡伯勵 (Choi Pak Lai) lineage in Hong Kong—perhaps the most prominent living almanac tradition—works within the Xieji framework. When Richard J. Smith surveyed Chinese almanac practice in his 1991 study Fortune-tellers and Philosophers: Divination in Traditional Chinese Society, the Xieji was already the baseline against which other traditions were measured.
The text's influence extended beyond the Chinese mainland. Carole Morgan's 1980 academic study of Chinese almanac pages, Le Tableau du boeuf du printemps, documented how the Xieji's framework had been absorbed into overseas Chinese almanac production—a testament to its reach across diaspora communities who had no reason to follow Qing imperial directives but every reason to use a system that worked.
The Irony
And now the twist. Most modern almanac apps have quietly re-introduced exactly the kind of material the Xieji compilers spent 36 volumes rejecting. Simplified scoring systems. Folk heuristics with no classical basis. Rules that contradict each other without acknowledgment. The chaos the Xieji was designed to resolve has, in the digital age, reassembled itself in a new medium.
If you've ever wondered why different almanac apps give different ratings for the same day, this is the deeper history behind that problem. The Xieji Bianfang Shu solved it in 1739. The solution is sitting in the Siku Quanshu, fully documented, openly argued, transparently reasoned. Most app developers just haven't read it.
The 1,843-Year Arc
From the Taichu reform in 104 BC to the Xieji Bianfang Shu in 1739 AD: 1,843 years. Across that span, the same institutional pattern repeated. The state asserts authority over temporal reckoning. Court scholars collect and evaluate existing knowledge. A standardized system is published. The system's authority derives partly from imperial backing and partly—crucially—from methodological rigor.
The Xieji Bianfang Shu is, at its core, the same kind of project as the Taichu reform. Different century, different material, different emperor. Same discipline. Same conviction that temporal knowledge should be accountable, traceable, and argued—not merely inherited.
For a deeper look at what the Xieji contains and how Six Lines implements it, see the companion article.
References
Primary Sources
協紀辨方書 (Xieji Bianfang Shu). 36-volume compilation, 1739. Siku Quanshu edition. The imperial almanac standardization project commissioned by Emperor Qianlong.
四庫全書總目提要 (Complete Library of Four Treasuries, General Catalogue). Catalogue entry describing the Xieji Bianfang Shu's place in imperial scholarship and its editorial methodology.
清史稿 (Draft History of Qing). Context for Qianlong-era compilation projects and the institutional framework of imperial scholarly commissions.
Secondary Scholarship
Smith, Richard J. Fortune-tellers and Philosophers: Divination in Traditional Chinese Society. Boulder: Westview Press, 1991. Survey of Chinese almanac traditions and the Xieji's role as the authoritative standard.
Morgan, Carole. Le Tableau du boeuf du printemps: étude d'une page de l'almanach chinois. Paris, 1980. Academic study of Chinese almanac pages and the Xieji framework's influence on overseas almanac production.
蔡伯勵 (Choi Pak Lai) lineage. Contemporary Hong Kong almanac master tradition working within the Xieji framework. master-insight.com