-
Notifications
You must be signed in to change notification settings - Fork 45
/
computation.html
executable file
·1 lines (1 loc) · 78.3 KB
/
computation.html
1
<!DOCTYPE html><html lang="en-US"><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="keywords" content="Chinese Calendar Calculation"><head><title>Calendar Calculation</title><link rel="stylesheet" href="calendar_min.css"><style>body{counter-reset:sec-counter}sect::before{counter-increment:sec-counter 1;content:counter(sec-counter) ". "}</style><script src="header_min.js"></script><base href="https://ytliu0.github.io/ChineseCalendar/"><script async src="https://www.googletagmanager.com/gtag/js?id=G-SN0QJRDXXT"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-SN0QJRDXXT")</script></head><body><div id="wrapper0" style="display:none;max-width:800px;margin:auto"><div id="menu"></div><div id="language"></div><h1>Calendar Calculation</h1><p>First draft: October 2018 Last major update: April 17, 2022</p><br><p>The time span of calendars on this website is from 722 BCE to 2200 CE. It can be divided into seven periods: modern period (1912–2200), Qing period (1645 – 1911), middle Han to Ming period (104 BCE–1644 CE), Southern Ming and Zheng period (1645 – 1683), Qin and Early Han period (221 BCE–104 BCE), Warring States period (480 BCE–222 BCE), Spring and Autumn period (722 BCE–481 BCE). Different methods are used to generate calendars in these periods, which are described in the following sections.</p><p>For convenience, I use <span class="nowrap">N<sub>y</sub></span> to denote the Chinese year whose New Year day is closest to Jan. 1 in the Western year y. For example, <span class="nowrap">N<sub>150</sub></span> began on Feb. 15, 150 and ended on Feb. 3, 151.</p><br><div style="border:1px solid #000;padding:10px"><p><b>Contents</b></p><ol><li><a href="computation.html#modern">Modern Period (1912 – 2200)</a></li><li><a href="computation.html#qing">The Qing Period (1645 – 1911)</a></li><li><a href="computation.html#imperial">Middle Han to Ming Period (104 BCE – 1644 CE)</a></li><li><a href="computation.html#southernming">Southern Ming and Zheng Period (1645 – 1683)</a></li><li><a href="computation.html#qinhan">Qin and Early Han Period (221 BCE – 104 BCE)</a></li><li><a href="computation.html#warring">Warring States Period (480 BCE – 222 BCE)</a></li><li><a href="computation.html#spring">Spring and Autumn Period (722 BCE – 481 BCE)</a></li></ol><p> <a href="computation.html#references">Footnotes and References</a></p></div><br><sect id="modern">Modern Period (1912 – 2200)</sect><p>In this period, I follow the rules stated by the GB/T 33661-2017 document<sup><a href="computation.html#GBT33661">PMO17</a></sup> mentioned in the <a href="rules.html">Chinese calendar rules page</a> to calculate the Chinese calendar and checked the results with the calendar data from the publications of the Purple Mountain Observatory. Positions of the Sun and Moon are computed based on the planetary and lunar ephemeris DE431<sup><a href="computation.html#DE431">DE431</a></sup> developed by the Jet Propulsion Laboratory (JPL). JPL's DE-series ephemerides are based on numerical integration and DE431 is one of the most accurate ephemerides covering long time span.<sup><a href="computation.html#fn0">fn0</a></sup> The calculation takes into account gravitational perturbations from 343 relatively large-mass asteroids. General relativistic effects are included by using dynamical equations derived from a parameterized post-Newtonian n-body metric. Additional accelerations arising from non-spherical effects of extended bodies including the Earth, Moon and Sun are also included. The DE431 ephemeris data are used to compute the geometric positions of the Sun and Moon, which are then corrected for the combined effect of <a href="https://en.wikipedia.org/wiki/Light-time_correction" target="_blank">light time</a> and <a href="https://en.wikipedia.org/wiki/Aberration_of_light" target="_blank">aberration of light</a>. The result is the apparent geocentric positions expressed in rectangular coordinates in the <a href="https://en.wikipedia.org/wiki/International_Celestial_Reference_System" target="_blank">International Celestial Reference System</a> (ICRS). They are then transformed to the ecliptic coordinates of date by taking into account the frame bias matrix, precession and nutation. Precession is calculated using the precession model of Vondrák et. al.<sup><a href="computation.html#vondrak11">Vondrák</a></sup> developed in 2011. Nutation is calculated by the IAU 2000A nutation model using formulas provided by IERS Conventions (2010)<sup><a href="computation.html#iers2010">IERS10</a></sup> and Kaplan 2005<sup><a href="computation.html#kaplan05">Kaplan05</a></sup>. Times of moon phases and 24 solar terms are first computed in <a href="https://en.wikipedia.org/wiki/Barycentric_Dynamical_Time" target="_blank">barycentric dynamical time</a> (TDB) using the <a href="https://en.wikipedia.org/wiki/Newton%27s_method" target="_blank">Newton-Raphson root-finding method</a>. They are then converted to UT1+8 for years before 1972 and UTC+8 in and after 1972. The difference between TDB and TT (<a href="https://en.wikipedia.org/wiki/Terrestrial_Time" target="_blank">Terrestrial Time</a>) is ignored since it is less than two milliseconds over several millennia. For years before 1972, values of TT-UT1 are calculated using the fitting and extrapolation formulae by <a href="http://astro.ukho.gov.uk/nao/lvm/" target="_blank">Stephenson et al (2016) and Morrison et al (2021)</a><sup><a href="computation.html#sm2016">SM16</a></sup>. For years between 1972 and present, TT-UTC is calculated from the published leap seconds. For years beyond 2024, approximate value of TT-UTC is estimated according to an extrapolation formula derived by <a href="http://astro.ukho.gov.uk/nao/lvm/" target="_blank">Stephenson et al (2016) and Morrison et al (2021)</a>. The equation is for TT-UT1, but can be used to approximate TT-UTC since by construction |UTC-UT1| < 0.9 seconds. The mathematical detail of all these calculations is explained in <a href="docs/sunMoon.pdf" target="_blank">this pdf file</a>.</p><p>Previously, I used the IAU 2006 precession model to calculate precession for this website, but the IAU 2006 model is only accurate within about 1000 years from the year 2000. This website only covered 1841 – 2200 and so it was fine, but now the time span is extended to 722 BCE – 2200 CE. Even though the past Chinese calendar on this website is based on the calendar issued at that time, times of moon phases and 24 solar terms in UT1+8 calculated using the modern method are also included for reference. Thus, the IAU 2006 model is inadequate for the years before 1000 CE. The Vondrák et. al. model is an improvement over IAU 2006 and is valid within 200,000 years from 2000. I compare the times of moon phases and solar terms computed by these two precession models. I find that between 1600 and 2500 the time differences of the solar terms are no more than 0.19 seconds and the time differences of the moon phases are no more than 0.00038 seconds. Hence, we can regard the two precession models as identical in this period.</p><p>The calendar data in this period are compared with those in the book <i>New Edition of Wànniánlì</i><sup><a href="computation.html#pmo86">PMO86</a></sup> edited by the Purple Mountain Observatory and in the book <i>Pocket Edition of 100-Year Chinese Calendar</i><sup><a href="computation.html#liu93">Liu93</a></sup> edited by Liú Bǎolín, who had been involved in the Chinese calendar calculation in the Purple Mountain Observatory for over 40 years. The time span of <i>New Edition of Wànniánlì</i> is from 1840 to 2050, whereas the time span of Liú's book is from 1911 to 2010. The data in these two books agree, but Liú's book also provides the times of new moons, full moons and 24 solar terms to the nearest minute. In the books, the calendar data before 1949 were taken from the calendars issued by the Chinese government at that time. In particular, calendar data before 1912 were taken from the <i>Shíxiàn Calendar</i> published by the Qing dynasty government. Data from 1912 to 1928 were taken from <i>Republic of China Calendar</i> published by the <a href="https://en.wikipedia.org/wiki/Beiyang_government" target="_blank">Beiyang government</a> of the Republic of China. Data from 1929 to 1948 were based on the <i>Kuómín Calendar</i><sup>[<a href="computation.html#kuomin">fn1</a>]</sup> published by the <a href="https://en.wikipedia.org/wiki/Nationalist_government" target="_blank">Nationalist government</a> of the Republic of China. Data after 1948 are calculated by the Purple Mountain Observatory, which has been responsible for computing the calendar since 1949. Whenever there is a discrepancy between my calculation and the data in the books on the start day of a Chinese month (i.e. lunar conjunction day), I use the data in the books on this website. There are only three discrepancies and they all occurred before 1929. In addition to the discrepancies in the dates of lunar conjunctions, there are also discrepancies in the dates of 24 solar terms. With one exception, all the discrepancies occurred before 1929. The following two tables list all the discrepancies between 1912 and 2050.</p><br><table><tr><th>Chinese Year</th><th>Chinese Month</th><th>Conjunction Day<sup>*</sup></th><th>Conjunction Time (UT1+8)</th></tr><tr><td>N<sub>1914</sub></td><td>10</td><td>Nov. 17, 1914</td><td>Nov. 18, 1914 at 00:02</td></tr><tr><td>N<sub>1916</sub></td><td>1</td><td>Feb. 3, 1916</td><td>Feb. 4, 1916 at 00:05</td></tr><tr><td>N<sub>1920</sub></td><td>10</td><td>Nov. 10, 1920</td><td>Nov. 11, 1920 at 00:05</td></tr></table><p><sup>*</sup> These dates are based on the calendars issued by the Chinese government at those times.</p><br><table><tr><th>Year</th><th>Solar Term</th><th>This website</th><th>Date (and Time) listed in calendar at the time</th></tr><tr><td>1912</td><td>Z10</td><td>Nov. 22 (at 23:48)</td><td>Nov. 23 (at 00:39)</td></tr><tr><td>1913</td><td>Z8</td><td>Sep. 23 (at 23:53)</td><td>Sep. 24 (at 00:48)</td></tr><tr><td>1917</td><td>J11</td><td>Dec. 8 (at 00:01)</td><td>Dec. 7 (at 23:47)</td></tr><tr><td>1927</td><td>J8</td><td>Sep. 9 (at 00:05)</td><td>Sep. 8 (at 23:52)</td></tr><tr><td>1928</td><td>Z5</td><td>June 22 (at 00:06)</td><td>June 21 (at 23:53)</td></tr><tr><td>1979</td><td>Z12</td><td>Jan. 20 (at 23:59:54)</td><td>Jan. 21 (at 00:00)</td></tr></table><br><p>The discrepancies before 1914 are mainly caused by the fact that the calendar at that time was calculated based on a method developed in 1742. While the method was pretty good at the time (see the next section), it is not accurate by today's standard. In addition, times were based on Beijing's apparent solar time. A more accurate method was adopted in the calendar calculation after 1913, and times were changed from Beijing's apparent solar time to Beijing's mean solar time (UT+7:46), which was about 14 minutes earlier than the times for the meridians of 120°E. This explains the discrepancies in the years 1914, 1916, 1917, 1920, 1927 and 1928. After 1928, times were calculated for the meridians of 120°E (UT+8) (UTC was not invented until 1960s). The case in 1979 is special. My calculation indicates that the time of Z12 was only 6 seconds before Jan. 21. Using the data in the solar table in <i>Chinese Astronomical Amlamac for the Year 1979</i>, I calculate the time to be at 00:00:12 (UTC+8) on Jan. 21. This means that highly accurate ephemerides are required to pinpoint the exact date. Prior to 1984, positions of the Sun in most published annual astronomical almanacs (including the <i>Chinese Astronomical Almanac</i> edited by the PMO) were calculated based on <a href="https://en.wikipedia.org/wiki/Newcomb%27s_Tables_of_the_Sun" target="_blank">Newcomb's <i>Tables of the Sun</i></a>, which were developed in 1895 and were accurate to about 1". It is possible that the calendar calculation at that time was based on an ephemeris of similar precision. If so, the times of 24 solar terms could be off by about 25 seconds. By comparing the times of the 24 solar terms in Liú's book<sup><a href="computation.html#liu93">Liu93</a></sup> (printed to the nearest minute) and my calculation, I find deviations of one minute occurring very frequently. No such deviations are found in the times of 24 solar terms listed in the <i>Chinese Astronomical Almanac</i> for 2015 (edited by the Purple Mountain Observatory). This is not surprising since the times there were computed using JPL's DE421 ephemeris. There is only a very slight difference between DE421 and DE431 within a few dozen years from 2000. In any case, none of the discrepancies listed in the table affects the days and months of the Chinese calendar.</p><p>As mentioned in the <a href="rules.html#newStandard">Chinese calendar rules page</a>, times (in UTC+8) of lunar conjunctions and 24 solar terms decades from now cannot be determined very accurately because of the irregularity of Earth's rotation. In situations when the times are close to midnight, the actual dates of lunar conjunctions and solar terms may be off by one day. These situations are indicated on the relevant calendar pages. When a lunar conjunction occurs near the midnight, the predicted first day of a month may be off by one day. When a major solar term occurs near the midnight, most of the time there will be no effect on the Chinese calendar. However, if a new moon also occurs within a day from the date of the major solar term, the off-by-one-day-error could result in a different leap month. I have checked that this does not happen over the time span covered on this website. The following table lists the lunar conjunctions and solar terms from 2051–2200 that are predicted to occur close to midnight, and therefore may be off by one day.</p><br><table><tr><th>Year</th><th>Predicted Date and Time (in UTC+8) of Lunar Conjunction</th></tr><tr><td>2057</td><td>Sep. 29 at 00:00:40</td></tr><tr><td>2089</td><td>Sep. 4 at 23:59:11</td></tr><tr><td>2097</td><td>Aug. 8 at 00:02</td></tr><tr><td>2115</td><td>Feb. 24 at 23:59</td></tr><tr><td>2116</td><td>May 12 at 23:59</td></tr><tr><td>2133</td><td>Sep. 29 at 00:02</td></tr><tr><td>2165</td><td>Dec. 4 at 00:00:29</td></tr><tr><td>2172</td><td>Oct. 18 at 00:01</td></tr></table><br><table><tr><th>Year</th><th>Solar Term</th><th>Predicted Date and Time (in UTC+8)</th></tr><tr><td>2051</td><td>Z2</td><td>Mar. 20 at 23:59:19</td></tr><tr><td>2083</td><td>J1</td><td>Feb. 3 at 23:59:27</td></tr><tr><td>2084</td><td>Z2</td><td>Mar. 20 at 00:00:35</td></tr><tr><td>2114</td><td>Z10</td><td>Nov. 22 at 23:58</td></tr><tr><td>2142</td><td>J8</td><td>Sep. 8 at 00:00:11</td></tr><tr><td>2155</td><td>Z9</td><td>Oct. 23 at 23:58</td></tr><tr><td>2157</td><td>Z11</td><td>Dec. 21 at 23:59</td></tr><tr><td>2183</td><td>Z2</td><td>Mar. 20 at 23:59:46</td></tr><tr><td>2186</td><td>J1</td><td>Feb. 4 at 00:02</td></tr></table><br><sect id="qing">The Qing Period (1645 – 1911)</sect><p>The rules for the calendar calculation in this period is basically the same as the modern rules. The only difference is that times were computed for the Beijing meridian instead of 120°E (UT1+8), and apparent solar time was used instead of the mean solar time. To reconstruct the calendar in this period, I first used the modern method to calculate the calendar and then modified the data to match the calendar issued by the Qing government. The source of the Qing calendar data are from the book <i>New Edition of Wànniánlì</i><sup><a href="computation.html#pmo86">PMO86</a></sup> and <i>3500 Years of Calendars and Astronomical Phenomena</i><sup><a href="computation.html#Zhang1997">Zhang97</a></sup>. Calendar data in <i>New Edition of Wànniánlì</i> were taken from the <i>Shíxiàn Calendar</i> issued by the Qing government, but the book only covered the years starting from 1840. Calendar data in <i>3500 Years of Calendars and Astronomical Phenomena</i> were computed using the calendar rules stated in the historical documents and were compared to available calendar data. Most all of the calendars issued by the government over the past 400 years or so have been preserved and so most of the data in the book should be the same as the actual calendar used in this period. I compared the data in the two books between 1840 and 1911 and didn't find any mismatch.</p><p>When comparing the calendar data calculated by the modern method and the official calendar data, I find more than 200 mismatches in this period. Even though I had to make more than 200 corrections, it was still faster than entering the data by hand. Apart from the time difference between the local apparent solar time and UT1+8, the cause of the discrepancies was largely due to the inaccuracy of the methods adopted by astronomers in the Imperial Astronomical Bureau (欽天監) in the calculation of the positions of the Sun and Moon.</p><p>Update on 2020-12-12: I created a <a href="http://ytliu.epizy.com/Shixian" target="_blank">web-based platform</a> to calculate the solar and lunar positions as well as the times of solar terms and moon phases according to the Shixian system. It may be useful for people interested in the study of the history of Chinese astronomy in the Qing dynasty.</p><p>The astronomical method used in the almanac calculation before 1730s was developed near the end of the Ming dynasty around 1635 and was based on the astronomical model of Tycho Brahe. In the 17th century, the predicted times of two solar eclipses and one lunar eclipse were significantly different from the actual times. In 1630, Emperor Chóngzhēn (崇禎) appointed <a href="https://en.wikipedia.org/wiki/Xu_Guangqi" target="_blank">Xú Guāngqǐ</a> (徐光啟) to organize a committee to improve the almanac. A calendar office (曆局) was created to carry out the calendar reform. It should be noted that "calendar" is not an accurate translation, since the officials in charge of making "calendar" were also required to predict various astronomcial events such as eclipses. Xú, a Catholic convert, was impressed by an eclipse prediction using Western astronomical calculation introduced by the Italian Jesuit Matteo Ricci. He decided to develop an astronomical system based on the Western astronomy. The Jesuits Nicholas Longobardi, Johann Schreck, Giacomo Rho and Johann Adam Schall von Bell were appointed to the calendar office to help to develop a new astronomical system. In 1635, <i>Chóngzhēn Lìshū</i> (《崇禎曆書》 or <i>Treatises on Calendrical Astronomy of the Chóngzhēn Reign</i>) was compiled, introducing the new system. The calendar based on this system was not adopted because of the opposition of the conservatives. Eight contests between the old and new astronomical systems were recorded to have been taken place in 10 years, involving predictions of eclipses and motions of Jupiter, Mercury and Mars. The new system defected the old system 8-0. The emperor realized the superiority of the new system and decided to adopt it. However, the Ming dynasty collapsed before the adoption was officially announced.</p><p>In 1644, the Qing government took over Beijing. The Prince-Regent <a href="https://en.wikipedia.org/wiki/Dorgon" target="_blank">Dorgon</a> heard of the superiority of the new system. Johann Adam Schall von Bell was asked to explain the new system and the Qing government soon decided to adopt it to calculate the calendar. Schall von Bell shortened the <i>Treatises on Calendrical Astronomy of the Chóngzhēn Reign</i> and renamed it as <i>Xīyáng Xīnfǎ Lìshū</i> (《西洋新法曆書》, roughly translated to <i>Treatises on Calendrical Astronomy Using the New Method from the West</i>). The first calendar calculated by the new system, the <i>Shíxiàn Calendar</i> (時憲曆), was issued in <span class="nowrap">N<sub>1645</sub></span>. The new system abandoned the <i>pínqì</i> rule (based on the mean motion of the Sun), which had been used for nearly 2000 years, in favor of the <i>dínqì</i> rule (based on the motion of the true Sun) in the calculation of the 24 solar terms. Positions of the Sun, Moon and planets were computed using Tycho's model.</p><p>The Qing government stopped using the Western astronomical system for the imperial calendars from <strike><span class="nowrap">N<sub>1666</sub></span></strike> <span class="nowrap">N<sub>1667</sub></span> to <span class="nowrap">N<sub>1669</sub></span> because of the Calendar Case<sup><a href="computation.html#calcase">CC</a></sup> (曆獄). The calendars in this period were calculated by the <i>Dàtǒng</i> system, which was used in the Ming dynasty. The 24 solar terms were calculated based on the <i>pínqì</i> rule. Wāng Yuēzhēn (汪曰楨), a Chinese mathematician in the 19th century, explained in his book 《歷代長術輯要》(roughly translated to <i>Compilation of Historical Calendars</i>) that the calendar book <i>Yù Dìng Wàn Nián Shū </i>(《御定萬年書》 or <i>Ten Thousand Years of Imperial Calendar</i>, compiled in mid-18th century and revised several times later to extend the years of coverage) published by the Imperial Astronomical Bureau recomputed the solar terms in these years based on the Western system, which were different from the actual solar terms listed in the imperial calendars for these years. The calendar data in the book <i>A Chinese calendar translated into the western calendar from 1516 to 1941</i><sup><a href="computation.html#Zheng1936">[Zheng]</a></sup> edited by Hesheng Zheng are based on <i>Ten Thousand Years of Imperial Calendar</i> and so also has the solar term dates different from the imperial calendars. Looking at the data in <i>3500 Years of Calendars and Astronomical Phenomena</i>, I find that the solar term dates are also based on the <i>dínqì</i> rule and they are the same as the dates in Zheng's book. I provide two sets of calendrical solar term dates in these years on this website for reference: one based on the dates in <i>3500 Years of Calendars and Astronomical Phenomena</i>, which are computed using the Western system; another based on the dates computed using the <i>Dàtǒng</i> system. As for the lunar conjunctions, the dates calculated using the <i>Dàtǒng</i> astronomical system are identical to those computed using the Western system in these years. However, the differences in the solar term dates made one leap month in these years inconsistent in the two systems: a leap month should occur after month 12 in <span class="nowrap">N<sub>1669</sub></span> according to the <i>Dàtǒng</i> system, but after month 2 in <span class="nowrap">N<sub>1670</sub></span> according to the Western system. This is also recorded in the official history: In 1669, the Belgian Ferdinand Verbiest was appointed as the assistant director of the Imperial Astronomical Bureau to correct mistakes in the imperial calendars made by the incompetent officials in the Bureau following the Calendar Case. He pointed out a serious mistake in the imperial calendar for <span class="nowrap">N<sub>1669</sub></span>: the leap month was placed after month 12 when it should be after month 2 in <span class="nowrap">N<sub>1670</sub></span>. Emperor Kangxi (康熙) ordered the <a href="https://en.wikipedia.org/wiki/Ministry_of_Rites" target="_blank">Ministry of Rites</a> (禮部) to conduct a thorough investigation. The majority of the officials in the Astronomical Bureau sided with Verbiest. The Kangxi Emperor then ordered by decree to move the leap month from after the 12th month of <span class="nowrap">N<sub>1669</sub></span> to after the second month of <span class="nowrap">N<sub>1670</sub></span> (<a href="https://zh.wikisource.org/wiki/%E5%BA%B7%E7%86%99%E6%9C%9D%E5%AF%A6%E9%8C%84/%E5%8D%B7%E4%B9%8B27" target="_blank">《康熙朝實錄‧卷二十七》</a> or <i>Veritable Records in the Kangxi Era</i>, Chapter 27). Since then, the Western system was restored for the calculation of the imperial calendars and astronomical almanacs in the Qing dynasty. Therefore, there were two versions of the imperial calendar for <span class="nowrap">N<sub>1669</sub></span>: one calculated using the old system and the other calculated using the Western system.</p><p><b>Update in May, 2024:</b> There are imperial planetary ephemerides for the years <span class="nowrap">N<sub>1662</sub></span>-<span class="nowrap">N<sub>1671</sub></span> on the <a href="https://qingarchives.npm.edu.tw/index.php" target="_blank">Digital Library of Qing Archives</a> managed by the National Palace Museum in Taiwan. The dates and times of solar terms in the ephemeris for <span class="nowrap">N<sub>1666</sub></span> agree with the calculations by <i>Xīyáng Xīnfǎ Lìshū</i>, whereas those for <span class="nowrap">N<sub>1667</sub></span>-<span class="nowrap">N<sub>1669</sub></span> agree with the calculations by the <i>Dàtǒng</i> system.</p><p>There were mismatches between figures and tables in <i>Treatises on Calendrical Astronomy Using the New Method from the West</i>. There were also many places where explanations were vague and hard to understand. In 1714, it was decided that the book needed to be revised, resulting in the compilation of <i>Qīn Ruò Lì Shū</i> (欽若曆書) in 1722. It was renamed as <i>Lìxiàng Kǎochéng</i> (《曆象考成》, roughly translated to <i>Thorough Investigation of Calendrical Astronomy</i>) a few years later. The book was compiled in the name of the Kangxi emperor, who intended to break the Jesuit monopoly in calendrical astronomy. He established an Office of Mathematics (<i>Suànxuéguǎn</i> 算學館) at the Hall of Cultivation (Mēngyǎngzhāi 蒙養齋) in the inner palace. Chinese scholars were recruited to study Western mathematics and astronomy and to compile treatises. Many Chinese academicians were involved in the compilation of <i>Thorough Investigation of Calendrical Astronomy</i> and they incorpotated several new methods developed by Chinese scholars. After the formal publication of the book in 1724, the Chinese academicians thought that they had mastered the Western astronomy and began to challenge the Jesuit authority over the astronomical affairs. It was suggested that the Imperial Astronomical Bureau should no longer be directed by westerners. However, the Chinese academicians were not aware of the progress of Western Astronomy. The astronomical theory in <i>Thorough Investigation of Calendrical Astronomy</i> was still based on Tycho's model. Not only was the model outdated, but also the errors accumulated over time. There was a solar eclipse on July 15, 1730. This was the first solar eclipse visible in the capital of China after the publication of <i>Thorough Investigation of Calendrical Astronomy</i>. To assert their authority on astronomy, the Jesuits Ignatius Kögler and Andreas Pereira, who were in charge of the Imperial Astronomical Bureau, used this eclipse as an opportunity to point out a slight discrepancy between observation and prediction based on <i>Thorough Investigation of Calendrical Astronomy</i>. Mingtu (明圖), the Manchu director of the Bureau of Astronomy, presented a petition to the Yongzheng (雍正) emperor, pointing out that if the shortcomings in <i>Thorough Investigation of Calendrical Astronomy</i> were not remedied, discrepancies between predictions and observations would grow with time. The emperor granted the proposal and Kögler and Pereira were put in charge of revising the astronomical system. They used the method and data from the French astronomer Giovanni Cassini and German Jesuit Nicasius Grammaticus to create tables for the motions of the Sun and Moon.</p><p>The Jesuits inserted the new tables to the end of the book <i>Thorough Investigation of Calendrical Astronomy</i> without any documentation. Only three people in the Imperial Astronomical Bureau knew how to use them. This was very unusual. As a result, the government asked for a revision of the book, resulting in the compliation of <i>Lìxiàng Kǎochéng Hòubiān</i>(《曆象考成後編》, roughly translated to <i>Later Volumes of the Thorough Investigation of Calendrical Astronomy</i>) in 1742. In the new system, Kepler's laws of motion were introduced, but the Sun was described to move on an elliptical orbit around the Earth with the Earth fixed on one focus of the ellipse. In terms of practical calculation, the result was identical to Kepler's heliocentric model. The Moon's position was calculated based on Newton's theory of lunar motion, which incorporated Kepler's laws, Jeremiah Horrocks' rotating ellipse model, and several terms Newton derived from his theory of gravitation.<sup><a href="computation.html#cook">Cook</a>, <a href="computation.html#kollerstrom">Kollerstrom</a></sup></p><p>There were many discrepancies between the dates of the 24 solar terms calculated using the modern method and Tycho's model. Therefore, the calendrical solar terms, the solar terms calculated by the astronomical sysetm at that time, are listed on our <a href="index.html">calendar webpage</a> together with the solar terms calculated using the modern method. When the calculation was switched to using Kepler's laws, the discrepancies were greatly reduced. So after 1733, the dates of the calendrical solar terms were mostly the same as the dates calculated using the modern method and therefore they are omitted, except when there were discrepancies. As for the lunar conjunction, the conjunction day is the same as the first day of a month. Since we use the calendar issued at that time, it is not necessary to list the "calendrical conjunction" separately.</p><p>With the adoption of the <i>dínqì</i> rule, problems relating to the leap months arise. The no zhōngqì rule that had been used over 1700 years no longer works, because it is now possible to have a month without a major solar term in a regular suì and more than one month without a major solar term in a leap suì. This problem was already noticed by the officials in the calendar office in the late Ming dynasty. One official named Lǐ Tiānjīng (李天經) proposed a method to resolve the issue. If a solar term and conjunction occur on the same day, the traditional convention is that the solar term is considered to be in the month associated with the conjunction. Lǐ proposed that if the solar term occurred earlier than the conjunction, it should be considered to be in the preceding month even if they were on the same day. Only if the solar term occurred later than the conjunction would it to be considered to be in the month associated with the conjunction. This method would be able to handle almost all situations. In <span class="nowrap">N<sub>1645</sub></span>, the <a href="http://ytliu.epizy.com/Shixian/N1645.html" target="_blank"><i>Shíxiàn Calendar</i></a> listed the date of the major solar term Z6 to be on the first day in leap month 6, breaking the traditional rule that a leap month must not contain any major solar term. Wāng Yuēzhēn explained in <i>Compilation of Historical Calendars</i> that even though the solar term Z6 and the lunar conjunction associated with the month occurred on the same day, Z6 occurred earlier in the day than the lunar conjunction and was counted as a major solar term of the previous month. As a result, leap month 6 did not contain any major solar term. This was exactly the idea proposed by Lǐ. However, this rule was only used in <span class="nowrap">N<sub>1645</sub></span>. It was never used again after this year. Historical document states that the rule of intercalation was to place a leap month to the first month that did not contain a major solar term after the winter solstice in a leap suì.<sup><a href="computation.html#fn3">fn3</a></sup> This is the origin of Rule 5 stated in the <a href="rules.html#rules">Chinese calendar rules page</a>. The reason why Lǐ's rule was not adopted was probably because the traditional no zhōngqì rule could handle most leap months. Having a month without a major solar term in a regular suì or more than one month without a major solar term in a leap suì is very rare, and these situations can be resolved by slightly modifying the no zhōngqì rule. Using Lǐ's rule will result in the same situation as in <span class="nowrap">N<sub>1645</sub></span>: a leap month that could be handled by the no zhōngqì rule was modified to a leap month that violated tradition. Adopting the <i>dínqì</i> rule already generated controversies<sup><a href="computation.html#xiaoan">Xiaoan</a></sup>. Had Lǐ's rule been used, even more controversies would surely have been generated.</p><br><sect id="imperial">Middle Han to Ming Period (104 BCE – 1644 CE)</sect><p>There were more than 40 different astronomical systems developed to calculate the calendars in this period spanning more than 1700 years. All of these methods were quite different from the modern method. Studying these systems one by one and then checking the resulting calculations would take too much time. Instead, I use the calendar data in the book <i>3500 Years of Calendars and Astronomical Phenomena</i><sup><a href="computation.html#Zhang1997">Zhang97</a></sup> in this period. When checking the data in the book, I found more than 40 mistakes in the book. Most of these mistakes have been pointed out by Xǔ Jiànwěi (許劍偉), creator of the software Shòuxīng Astronomical Almanac (<a href="http://www.nongli.net/sxwnl/" target="_blank">寿星天文历</a>). All of the errors discovered so far are compiled on <a href="3500Calendars_errors.html">this page</a> for those who can read Chinese.</p><p>Starting on the first day of month 5 in <span class="nowrap">N<sub>-103</sub></span>, I use the calendar data from <i>3500 Years of Calendars and Astronomical Phenomena</i>. The calendar data in <span class="nowrap">N<sub>-103</sub></span> before month 5 are calculated using the reconstruction method described in Section 5.</p><p>In this period (104 BCE – 1644 CE), there are a few things worth mentioning:</p><ol><li><p>There were four short periods in which the beginning of a year was changed to other months:</p><ul><li>The Xin dynasty was established in 9 CE. The chǒu month (present day month 12) was designated as the first month of a year; the yín month (present day month 1) became month 2 and so on. The Chinese month numbers were shifted by one. As a result, <span class="nowrap">N<sub>8</sub></span> had only 11 months. The Xin dynasty was overthrown in 23 CE and the Han dynasty was restored. The month numbers were then switched back with month 1 being the yín month again. As a result, the Chinese year in 23 CE had two sets of calendar: one for the Xin dynasty (chǒu month being the first month) and the other for the restored Han dynasty (yín month being the first month), also known as Gengshi. The two sets of calendar had 11 overlapping months: the second month in the Xin calendar was the same as the first month in the Gengshi calendar, the third month in the Xin calendar was the same as the second month in the Gengshi calendar, ..., and the last month in the Xin calendar was the same as the 11th month in the Gengshi calendar.</li><li>In 237 CE, emperor Mingdi of the Wei dynasty (魏明帝) declared that the chǒu month (present day month 12) would be the first month of a year; the yín month (present day month 1) became month 2 and so on. The Chinese month numbers were shifted by one. The new system was imposed after month 2 in <span class="nowrap">N<sub>237</sub></span>, in which month 4 was followed by month 2. When the emperor died in 239 CE, the month numbers were switched back with month 1 being the yín month again in the following year. As a result, <span class="nowrap">N<sub>239</sub></span> had 13 months, where month 12 appeared twice (zǐ month and chǒu month). In addition, month 12 in <span class="nowrap">N<sub>236</sub></span> had only 28 days as a new version of the Chinese calendar was adopted.</li><li>In December 689, Empress Consort Wu (武則天) designated the zǐ month (month 11) as the first month of a year. However, the month numbers did not change. The zǐ month was named Zheng, which was usually referred to month 1; chǒu month was still called month 12; yín month was month 1 and so on. On this website the Zheng month is still labelled as month 11. The first month of a year was changed back to month 1 in February 701. <span class="nowrap">N<sub>689</sub></span> only had 11 months (one leap month), whereas <span class="nowrap">N<sub>700</sub></span> had 15 months (one leap month).</li><li>In December 761, emperor Suzong of the Tang dynasty (唐肅宗) designated the zǐ month (present day month 11) as the first month of a year; the chǒu month (present day month 12) became month 2; the yín month (present day month 1) became month 3 and so on. The Chinese month numbers were shifted by two. As a result, <span class="nowrap">N<sub>761</sub></span> had only 10 months. The month numbers ware switched back to the old system in April 762. <span class="nowrap">N<sub>762</sub></span> had 14 months, with two month 4s (mǎo month and sì month) and two month 5s (chén month and wǔ month).</li></ul></li><li><p>Between 104 BCE and 1644 CE, there were periods when China was divided into many states. Each state issued its own calendar and these calendars were not exactly the same. I studied about 20 of the ancient astronomical systems that were used for calendar computation, and was able to reproduce the Chinese calendars before 665, in 822-892 and in 1281-1644. My calendar data before 619 almost completely match the data in <i>3500 Years of Calendars and Astronomical Phenomena</i>, whereas the majority of my data in 619-665, 822-892 and 1281-1644 match the data in the book. With these newly created computer programs, I was in a position to reproduce the calendars in the periods when China was divided.</p><p>Appendices 2-4 in <i>3500 Years of Calendars and Astronomical Phenomena</i> contain tables comparing the calendar differences between different states in the Three Kingdoms period (223-280), Southern and Northern dynasties period (384-589) and the period between 947 and 1279. The preface of the book says that the data in the appendices are based on the book 《歷代長術輯要》(roughly translated to <i>Compilation of Historical Calendars</i>) by Wāng Yuēzhēn (汪曰楨). For the convenience of comparison between my calculation and the data in the book, I wrote a code to create tables for calendar differences in the <a href="ThreeKingdoms_calendars.html">Three Kingdoms period (223-280)</a> and <a href="NorthSouth_calendars.html">Northern and Southern dynasties period (384-589)</a> in the same form as the tables in Appendices 2-3 of the book. I found that there were only a few mismatches between my computation and the data in the book. Three of the mismatches are also present between the book's main text and the appendices! My data agree with the main text. Since I am not an expert in Chinese history, I can't determine which of them are correct. I therefore only mention these discrepancies. For the other discrepancies, I compared the data with the calendar data on the <a href="http://sinocal.sinica.edu.tw/" target="_bklank">Chinese-Western calendar conversion website</a> created by Academia Sinica in Taiwan, as well as the data in the book <i>Compilation of Historical Calendars</i>. I found that in 4 of the mismatches, the book's data agree with the other two sources and therefore I modified my data. However, in 4 of the remaining mismatches my data agree with the other sources and so I don't use the book's data.</p><p>I also intended to calculate the calendars in 947-1279 but encountered a difficulty. Four astronomical systems were used in the dynasties in the North for calendar computation in 947-1279. At the beginning of the Liao (a.k.a Khitan) dynasty, Tiáoyuán system was used until 994 when it was replaced by the Dàmíng system. This Dàmíng system was created by Jiǎ Jùn (賈俊), which was different from the Dàmíng system created by Zǔ Chōngzhī (祖沖之) several hundred years earlier. After the Jin dynasty (established by the Jurchen people) replaced Liao in 1125, a new calendar based on another Dàmíng system (created by Yáng Jí 楊級) was adopted in 1137. The system was found to be inaccurate in predicting several eclipses and so was revised by Zhào Zhīwēi (趙知微) in 1182 and was in use even after the Mongols conquered Jin in 1234. Tiáoyuán system and Jiǎ's Dàmíng system were not preserved. When the 14th century historians wrote the chapters on calendars and almanacs in the book <i>History of Liao</i>, they didn't have the information on Jiǎ's Dàmíng system and thought that it was the same as Zǔ Chōngzhī's Dàmíng system. They then copied the description of Zǔ's Dàmíng system from an earlier historical record! To deal with the missing systems, Wāng reconstructed the calendars using systems that he thought were similar to the missing ones. In particular, he replaced Tiáoyuán system by Xuānmíng system, Jiǎ's Dàmíng system by Zhào Zhīwēi's revised Dàmíng system and then adjusted the leap months according to the records in <i>History of Liao</i>. Looking at the calendar difference table in Appendix 4 of <i>3500 Years of Calendars and Astronomical Phenomena</i>, I see that the calendar differences between the south and north dynasties are not much. Instead of following Wāng's "calculate-and-correct" approach to reconstruct the calendars in the north states, it is much simpler to just use Appendix 4's calendar difference data directly to reconstruct the calendars in the north states from the calendars in the south state. The resulting JavaScript code and the JSON data storing the calendar differences turn out to be much shorter than the code that generates the calendars in 221-280 and 384-589. This approach is equivalent to using the systems in the south state to calculate calendars and then make corrections. The complicated calculation is actually hidden in the calendar computation using the systems in the south state. Appendix 4 of <i>3500 Years of Calendars and Astronomical Phenomena</i> has no information on the calendrical solar terms, so I need to find a way to fill in the data for the <a href="index.html">calendar page</a>. The approach is described briefly at the bottom of the <a href="LiaoJinYuan_calendars.html">calendar differences in 947-1279 page</a>.</p><p>Combined the algorithms of calendar calculation in these periods, I added calendars in several additional dynasties in 221-280, 384-589, and 947-1279 in the <a href="index.html">calendar page</a>. When a Western year in those periods is entered, there will be buttons appearing on the page for selecting different dynasties. Conversion tables for these additional dynasties are also added in the <a href="table.html">conversion table page</a>.</p></li><li><p>In my study of the Ming calendar calculation, I found at least 7 mistakes in the lunar conjunction dates in several Chinese calendar data books. The 7 mistakes on this website have been corrected based on the imperial calendars in the Ming dynasty. I present my findings in the article <a href="MingCalendar.html">"Lunar Conjunction Calculation in the Ming Dynasty and Corrections to the Ming Calendar Data"</a>.</p></li><li><p>While the Chinese calendar was modified many times in this period, the Western calendar was quite stable. There was one major reform in 1582: the Gregorian calendar reform. Before 1582, the Western calendar was based on the Julian calendar, which was a solar calendar. Years that were divisible by 4 (leap years) had 366 days and the others had 365 days. The average length of a year in the Julian calendar is 365.25, which is 0.0078 days longer than the tropical year. The Gregorian calendar reform was motivated by the controversies over the date of Easter. The date of Easter was established by the First Council of Nicaea in 325 to be the Sunday following the full moon that follows the vernal (March) equinox. However, "full moon" and "vernal equinox" were not defined by astronomy. The date of Easter is actually determined by the first Sunday after the <a href="https://en.wikipedia.org/wiki/Ecclesiastical_full_moon" target="_blank">ecclesiastical full moon</a> that occurs on or after March 21. March 21 was chosen since it was the approximate date of the equinox in 325 in the Julian calendar. The ecclesiastical full moon was determined by the <a href="https://en.wikipedia.org/wiki/Metonic_cycle" target="_blank">Metonic cycle</a>, in which 235 synodic months were assumed to be the same as 19 tropical years. Since the average year of the Julian calendar is slightly longer than the tropical year, the date of vernal equinox drifted earlier and earlier in the Julian calendar. Also, there is a 0.08-day difference between 235 synodic months (6939.688 days) and 19 tropical years (6939.6075 days), causing a drift between the ecclesiastical full moon and astronomical full moon. By the late 16th century, the vernal equinox drifted to March 11 and the astronomical full moon were occurring four days before the ecclesiastical full moon, causing controversies over the "correct" time for celebrating Easter. In 1582, Pope Gregory XIII carried out the calendar reform. The date following Oct. 4, 1582 was Oct. 15, 1582. Ten days were skipped in order to restore the vernal equinox back to March 21. To prevent the drift of the vernal equinox in the calendar, three leap years are subtracted in every 400 years. This is accomplished by the rule that years that are divisible by 4 but not 100 (e.g. 2016) are leap years; years that are divisible by 100 but not 400 (e.g. 1900) are not leap years and years that are divisible by 400 (e.g. 2000) are leap years. This is the Gregorian calendar we are using today. The average length of a year is 365.2425 days, close to the tropical year 365.2422 days. It takes 3300 years for the error to accumulate to one day. The ecclesiastical calendar was also adjusted to synchronise the astronomical and ecclesiastical full moon over longer period of time. In 1582, only Spain, Portugal, France, Poland, Italy, Catholic Low Countries, and colonies adopted the new calendar. Over the next three centuries, the Protestant and Eastern Orthodox countries also adopted the new calendar, with Greece being the last European country to adopt the calendar in 1923. Although not every country in the West adopted the Gregorian calendar in 1582, the convention is still to switch to the Gregorian calendar on Oct. 15, 1582.<sup><a href="computation.html#fn2">fn2</a></sup></p></li><li><p>Julian calendar was proposed by Julius Caesar, the dictator of the Roman Republic. Caesar adopted the calendar system designed by the astronomer Sosigenes of Alexandria. The calendar took effect on Jan. 1, 45 BCE. Caesar was soon assassinated in 44 BCE and the leap years were not implemented correctly in the first 36 years. A leap day was inserted every three years instead of every four years. By 8 BCE, three additional leap days had been added. The error was rectified in -8 (9 BCE) by skipping three leap years in the following 12 years and the system was operated as Caesar intended after 4 CE. I follow the usual convention of not taking into account the leap-year error of the Julian calendar and simply extending the Julian calendar backwards to dates before 8 CE. This is known as the <a href="https://en.wikipedia.org/wiki/Proleptic_Julian_calendar" target="_blank">proleptic Julian calendar</a>.</p></li><li><p>The months in the Western calendar are January, February, March, April, May, June, July, August, September, October, November and December. January, March, April, May and June were named after the Roman gods and goddesses (see, e.g., <a href="https://www.almanac.com/content/how-did-months-get-their-names" target="_blank">Origins and Meanings of the 12 Months</a>). February was named for Februalia, a festival dedicated to ritual springtime cleaning and washing. July was named to honor Julius Caesar. August was named to honor the first Roman emperor (and grandnephew of Julius Caesar) Augustus Caesar. September to December are numbers representing seven to ten, indicating the numerical orders of the months in the ancient Roman calendar. The ancient Roman calendar had names for the first ten months: March, April, May, June, Quintilis, Sextilis, September, October, November and December. Later, January and February were added to the end of the year. Sometime between 8th century BCE and 2nd century BCE, January was moved to the beginning of the year. The Julian calendar reform in 45 BCE did not alter the month order, but Quintilis was renamed July in 44 BCE and Sextilis was renamed August in 8 BCE.</p><p>Even though January 1st had been the New Year's Day since ancient time, some Western countries that adopted the Julian/Gregorian calendar started a year on different dates. For example, some countries used March 1st as the New Year's Day, some used March 25th (near Spring equinox), some used Easter, some used December 25th (near winter solstice) and so on. Sometimes, <a href="https://en.wikipedia.org/wiki/Dual_dating" target="_blank">dual dating</a> is used to indicate some dates. For example, "10/20 February 1661/62" means that the date was February 10th (in Julian calendar) or February 20th (in Gregorian calendar). The year was 1661 or 1662, depending on the start date of a year. On this website, January 1st is used as the New Year's Day for all Western years. As mentioned above, Gregorian calendar is used on and after October 15th, 1582; Julian calendar is used between 8 CE and October 4th, 1582. Proleptic Julian calendar is used before 8 CE. The current month names are used in all Western years.</p><p>It seems that many Chinese people use Western month names for the Chinese months. For example, they say June when they actually mean the sixth month in the Chinese calendar, which causes confusion. We don't adopt this terrible "translation" here.</p></li></ol><br><sect id="southernming">Southern Ming and Zheng Period (1645 – 1683)</sect><p>The calendar data for the Southern Ming and Zheng dynasty are largely based on <i>Cán Míng Dà Tǒng Lì</i> (殘明大統曆 or <i>Datong Calendar of the Waning Ming Dynasty</i>) by Fu Yili (傅以禮) compiled in the 19th century. Fu's work is included in the last volume of the book series <i>Èr Shí Wǔ Shǐ Bǔ Biān</i> (二十五史補編 or <i>Supplement to The Twenty-Five Official Dynastic Histories</i>). Two corrections have been made on Fu's data: the Chinese New Year in 1671 is corrected according to the official <a href="N1671_Zheng.html">Datong Calendar for 1671</a> produced by the Zheng dynasty; the calendrical Z11 (winter solstice) date in 1676 is corrected according to the official <a href="N1676_Zheng.html">Datong Calendar for 1676</a>. On the <a href="index.html">yearly calendar page</a>, there is a button to select the calendar of the Southern Ming dynasty in 1645-1661 and a button to select the calendar of the Zheng dynasty in 1662-1683. In the <a href="table.html">conversion table page</a>, the conversion tables for Ming, Southern Ming and Zheng dynasties are placed on the same page. There is another page showing the <a href="QingSouthernMingZheng_calendars.html">calendar differences between Qing, Southern Ming and Zheng dynasties</a>.</p><p>Several versions of calendars in the Southern Ming and Zheng dynasty were produced in this period. Even though they were all based on the Datong astronomical system, their calculations most certainly deviated slightly from the calendar calculations used by the officials in the Ming dynasty before 1645. All discrepancies between the calendar dates calculated by the Datong system (using the method before 1645), <i>Datong Calendar of the Waning Ming Dynasty</i> and other sources are listed on relevant pages for reference. On a separate webpage, I discuss the <a href="SouthernMingCalendar.html">calendar dates in Southern Ming and Zheng dynasty</a> from the viewpoint of calendar computation.</p><br><sect id="qinhan">Qin and Early Han Period (221 BCE – 104 BCE)</sect><p>The calendars used between 221 BCE and 104 BCE were modified versions of the Zhuanxu calendar, one of the old calendars used in the third century BCE in the state of Qin. The first month was the hài month (present-day month 10). However, it was still called month 10 instead of month 1. The numerical order of the months in a year was 10, 11, 12, 1, 2, ..., 9. The intercalary month was placed at the end of a year, called post month 9 (後九月). There was a major calendar reform in 104 BCE, where the first month of a year was changed to month 1 and the intercalary month was placed in the month that did not contain a major solar term. The Chinese year in 104 BCE had 15 Chinese months as a result of the change. The calendars in this period are reconstructed according to the description in the article by Lǐ Zhōnglín (李忠林) in 2012<sup><a href="computation.html#Li2012">Li</a></sup>. The computation method is explained on <a href="QinHanCalendars.html">this page</a>.</p><p>Even though the reconstruction method is claimed to be valid for calendar from <span class="nowrap">N<sub>-245</sub></span> to month 5 in <span class="nowrap">N<sub>-103</sub></span>, our <a href="index.html">calendar page</a> uses this method from 221 BCE to month 4 in <span class="nowrap">N<sub>-103</sub></span> and our <a href="table.html">calendar table page</a> uses this method from <span class="nowrap">N<sub>-220</sub></span> to month 4 in <span class="nowrap">N<sub>-103</sub></span> (the <a href="index.html">calendar page</a> is mainly based on the Western calendar and the <a href="table.html">calendar table page</a> is mainly based on the Chinese calendar). Starting from month 5 in <span class="nowrap">N<sub>-103</sub></span>, both pages use the data from the book <i>3500 Years of Calendars and Astronomical Phenomena</i><sup><a href="computation.html#Zhang1997">Zhang97</a></sup>, which shows calendar data based on the Tàichū system (太初曆) beginning in month 1 in <span class="nowrap">N<sub>-103</sub></span><sup><a href="computation.html#fn4">fn4</a></sup>. In <span class="nowrap">N<sub>-103</sub></span>, month 3 had 29 days and month 4 should have had 30 days according to the reconstructed calendar. However, when the new calendar was used in month 5, the conjunction day moved one day earlier, turning month 4 into a short month. Month 5 was a short month in the new calendar. As a result, months 3, 4, 5 in <span class="nowrap">N<sub>-103</sub></span> all had 29 days. This is impossible for any calendar based on the <i>píngshuò</i> rule (i.e. based on the mean motion of the Moon and Sun), and could only occur when switching to a new calendar. If the switch is changed to month 6, month 5 will have 28 days, which is also impossible under normal circumstances.</p><br><sect id="warring">Warring States Period (480 BCE – 222 BCE)</sect><p>In the Warring States period, China was divided into many states. Each state used its own calendar. It was believed that there were six versions of calendars used by the states at that time. They are collectively called gǔliùlì (古六曆) or ancient six calendars. These six calendars were Zhou, Lu, Huangdi, Yin, Xia and Zhuanxu. They were all based on a similar algorithm. However, the first month of a year was not the same. The epoch (used to specify the initial data for the lunar conjunction and winter solstice) used in each calendar was also different. The calendars in gǔliùlì on this website are reconstructed based on the information in Section 3.6 of the book <i>Zhōng Guó Gǔ Dài Lì Fǎ</i> (《中国古代历法》 or <i>Ancient Chinese Calendars and Almanacs</i>)<sup><a href="computation.html#ZCBH2008">ZCBH</a></sup>. The computation method is explained in the <a href="guliuli.html">ancient six calendars page</a>.</p><p>The Xia calendar had two versions, which used slightly difference epoch in the calendar calculation. The version shown in the Spring and Autumn period (722 BCE – 481 BCE) is different from the one used in the Warring States period (480 BCE – 222 BCE): the epoch used in the Spring and Autumn period was the time when the lunar conjunction and Z1 were assumed to occur at midnight, whereas the epoch used in the Warring States period was the time when the lunar conjunction and winter solstice were assumed to occur at midnight.</p><p>Scholars have not come to a consensus on the position of the intercalary month. I assume that it was placed at the end of a year, and was simply called the leap month. Some people think that leap month was placed in the month without any major solar term. Months without a major solar term are also indicated for reference. The Zhuanxu calendar is special. The first month of the Zhuanxu calendar was the hài month (present day month 10), but it was called month 10. The subsequent months were named month 11, month 12, month 1, ..., month 9. The leap month was placed at the end of a year and was called post month 9 (後九月).</p><p>It is believed that the ancient six calendars were developed in the Warring States period, but none of them is preserved today. We can now only learn about them from sources that were written hundreds of years later. The reliability of the information remains uncertain to this date.</p><br><sect id="spring">Spring and Autumn Period (722 BCE – 481 BCE)</sect><p>In the Spring and Autumn period, China was divided into many states. Each state used its own calendar. In this period, we only have fragmented information about the calendar used by the Lu state from the chronicle <i>Chunqiu</i> revised by Confucius. This calendar is called Chunqiu here. The Chunqiu calendar on our website is reconstructed based on the information in Section 3.5 of the book <i>Ancient Chinese Calendars and Almanacs</i><sup><a href="computation.html#ZCBH2008">ZCBH</a></sup>. The computation method is explained on the <a href="chunqiu.html">Chunqiu Calendar page</a>.</p><p>The Chunqiu calendar did not have a fixed rule for placing the intercalary months. The result was that the first month of a year varied between the hài month (present day month 10) and yín month (present day month 1). The first month often coincided with the chǒu month (present day month 12) in the early years, and often coincided with the zǐ month (present day month 11) in the later years. Scholars have not come to a consensus on the position of the intercalary month. I assume that it was placed at the end of a year, and was simply called the leap month. The Chunqiu calendar did not have an algorithm to compute the winter solstice (or any other solar terms). The winter solstice at the time was determined by observation. Thus, there were no calendrical solar terms.</p><p>In addition to the Chunqiu calendar, three calendars Zhou, Yin and Xia (three of the <i>gǔliùlì</i> or <i>ancient six calendars</i>) are also provided for reference, although it is believed that they were developed in a later period. As mentioned in the previous section, the Xia calendar had two versions. The epoch used in the Spring and Autumn period was the time when the lunar conjunction and Z1 were assumed to occur at midnight.</p><br><hr><h2 id="references">Footnotes and References</h2><ul style="list-style-type:none"><li id="calcase">[<span class="ref">CC</span>] See, e.g., C. Jami, <a href="https://halshs.archives-ouvertes.fr/halshs-01222267/document" target="_blank">"Revisiting the Calendar Case (1664–1669): Science, Religion and Politics in Early Qing Beijing,"</a> <i>The Korean Journal for the History of Science</i>, 2015, 37(2), pp. 459-477; C. Cullen & C. Jami, <a href="https://journals.sagepub.com/doi/full/10.1177/0021828620901887" target="_blank">"Christmas 1668 and After: How Jesuit Astronomy Was Restored to Power in Beijing,"</a> <i>Journal for the History of Astronomy</i>, 2020, 51(1), pp. 3-50.</li><li id="cook">[<span class="ref">Cook</span>] A. Cook, <a href="https://academic.oup.com/astrogeo/article/41/6/6.21/225623" target="_blank">"Success and failure in Newton's lunar theory"</a>, Astronomy & Geophysics, 41, 6.21-6.25 (2000)</li><li id="DE431">[<span class="ref">DE431</span>] W.M. Folkner et al, <a href="https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/de430_and_de431.pdf" target="_blank">"The Planetary and Lunar Ephemerides DE430 and DE431"</a>, IPN Progress Report 42-196, February 15, 2014.</li><li id="DE441">[<span class="ref">DE441</span>] R.S. Park et al, <a href="https://ui.adsabs.harvard.edu/abs/2021AJ....161..105P/abstract" target="_blank">"The Planetary and Lunar Ephemerides DE440 and DE441"</a>, The Astronomical Journal, 161, 105, 2021.</li><li id="fn0">[<span class="ref">fn0</span>] In 2020, JPL released the DE440 and DE441 ephemerides<sup><a href="computation.html#DE441">DE441</a></sup> to replace DE430 and DE431. However, the TDB time differences in moon phases and solar terms between DE431 and DE441 are very small in recent centuries. Larger deviations are seen in distant past and future, but they are still smaller than the estimated error in the conversion between TDB and UT1. Therefore, the data computed by DE431 are still used here.</li><li id="kuomin">[<span class="ref">fn1</span>] As mentioned in the <a href="rules.html#newStandard">Chinese calendar rules page</a>, <i>Kuómín Calendar</i> did not provide the dates of the Chinese calendar. However, dates and times of new moons, first quarters, full moons, third quarters and 24 solar terms were listed. The Chinese calendar data in the two books during this period are probably reconstructed from these data and the rules of the Chinese calendar.</li><li id="fn2"><p>[<span class="ref">fn2</span>] It's the standard convention to switch from Julian to Gregorian calendar after October 4, 1582 and use <a href="https://en.wikipedia.org/wiki/Proleptic_Julian_calendar" target="_blank">proleptic Julian calendar</a> before 8 CE in astronomical computation. However, this convention is not necessarily followed elsewhere, especially in computer software. Apparently some software use Gregorian calndar before October 15, 1582. This is known as the <a href="https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar" target="_blank">proleptic Gregorian calendar</a>. The case of Unix's (and Linux's) <var>cal</var> function is particularly strange. It switches from Julian to Gregorian calendar after September 2, 1752, by which time it was necessary to correct by 11 days. This was the date when the Great Britain and its colonies adopted the Gregorian calendar. When you type <var>cal 1752</var> in a Unix/Linux/MacOS terminal, you will see that the date following September 2 is September 14.</p></li><li id="fn3"><p>[<span class="ref">fn3</span>] With the adoption of dingqi, it is possible to have two major solar terms appearing in a lunar month, which may lead to an extra month without a major solar term. This complicates the intercalation as there can be two lunar months without major solar terms several months apart. The Imperial Astronomical Bureau in the Qing dynasty followed the tradition of placing a leap month in a month without a major solar term. When there appeared two months without major solar terms and were only several months apart, only one of them was a leap month. In the early years of the Qing dynasty, the leap month was placed in the first month without a major solar term. However, a new problem arised in 1813. In 1813-1814, there were two lunar months without major solar terms and were 6 months apart. In the pre-computed calendar for <span class="nowrap">N<sub>1813</sub></span>, a leap month was originally placed after the eighth month (the first month without a major solar term) following the tradition, which led to the winter solstice occurring on the last day of month 10. This violated the tradition of the winter solstice always falling in month 11. As the emperor had to perform an important ceremonial ritual on the winter solstice every year, this unusual winter solstice date alerted the government and Emperor Renzong (仁宗) asked the Imperial Astronomical Bureau to investigate the matter. The Bureau eventually decided to place the leap month after the second month in <span class="nowrap">N<sub>1814</sub></span> in favor of letting the winter solstice falling in month 11 (<a href="https://www.zhonghuadiancang.com/lishizhuanji/daqingrenzongruihuangdishilu/96849.html" target="_blank"><i>Veritable Records of Emperor Renzong, Vol 242</i></a>). Hence the rules of winter solstice falling in month 11 and a leap month can only occur when there are 13 months between two month 11's should be finalized after 1813. When the winter solstice was fixed to be in month 11, there were only 12 months between the two month 11's in 1813 and 1814. Therefore, there was no leap month in <span class="nowrap">N<sub>1813</sub></span> even though there was one month without a major solar term. There were 13 months between the two month 11's in 1814 and 1815, so there should be a leap month in between. The month after the second month of <span class="nowrap">N<sub>1814</sub></span> was the only month without a major solar term, and it was assigned as the leap month. Even though the revised intercalation rule was probably finalized after <span class="nowrap">N<sub>1814</sub></span>, I used this intercalation rule and the dates of solar terms and lunar conjunctions computed by the Shixian astronomical system to compute the calendars in the 266 years between <span class="nowrap">N<sub>1646</sub></span> and <span class="nowrap">N<sub>1911</sub></span>, and confirmed that the computed calendar dates all match the actual dates in the Qing dynasty. The leap month in <span class="nowrap">N<sub>1645</sub></span> was the only leap month that didn't follow the intercalation rule. There were only 8 times where two months without major solar terms separated by a few months appearing in the 266 years between <span class="nowrap">N<sub>1646</sub></span> and <span class="nowrap">N<sub>1911</sub></span>. The rare case of <span class="nowrap">N<sub>1813</sub></span>-<span class="nowrap">N<sub>1814</sub></span> only occurred once. It won't occur again until <span class="nowrap">N<sub>2033</sub></span></p></li><li id="fn4"><p>[<span class="ref">fn4</span>] The calendar data in <i>3500 Years of Calendars and Astronomical Phenomena</i> are based on: the Zhuanxu calendar before <span class="nowrap">N<sub>-215</sub></span>, the author's reconstructed Han calendar proposed in 1978<sup><a href="computation.html#Zhang1978">Zhang78</a></sup> from <span class="nowrap">N<sub>-215</sub></span> to month 12 in <span class="nowrap">N<sub>-103</sub></span>, and the Tàichū system beginning in month 1 in <span class="nowrap">N<sub>-103</sub></span>. The book does not provide this information. I deduce it by comparing the data in the book and data in the author's another book <i>Tables of Chinese Calendars in the Pre-Qin Period</i><sup><a href="computation.html#Zhang1987">Zhang87</a></sup>. In <i>3500 Years of Calendars and Astronomical Phenomena</i>, two consecutive short months appear in month 12 and month 1 in <span class="nowrap">N<sub>-103</sub></span>. This is impossible under the <i>píngshuò</i> rule (i.e. based on the mean motion of the Moon and Sun), but is easily explained by the change of calendar in month 1.</p></li><li id="iers2010">[<span class="ref">IERS10</span>] <a href="https://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn36.html" target="_blank">IERS Conventions (2010)</a></li><li id="kaplan05">[<span class="ref">Kaplan</span>] G.H. Kaplan, <a href="https://arxiv.org/abs/astro-ph/0602086" target="_blank">"The IAU Resolutions on Astronomical Reference Systems, Time Scales, and Earth Rotation Models"</a>, U.S. Naval Observatory Circular No. 179, U.S. Naval Observatory, Washington, D.C. 20392 (2005).</li><li id="kollerstrom">[<span class="ref">Kollerstrom</span>] N. Kollerstrom, <i>Newton's Forgotten Lunar Theory: his Contribution to the Quest for Longitude</i>, Green Lion Press, USA (2000)</li><li id="Li2012"><p>[<span class="ref">Li</span>] Lǐ, Zhōnglín (李忠林), "Qín zhì Hàn chū (qián 246 zhì qián 104) lì fǎ yán jiū — yǐ chū tǔ lì jiǎn wéi zhōng xīn" (秦至汉初(前246至前104)历法研究—以出土历简为中心 or "Researches on Calendars from Qin to early Han (246 B.C to 104 B.C.) — centering on excavated calendrical bamboo slips"), in <i>Zhōng guó shǐ yán jiū</i> (《中国史研究》 or <i>Studies in Chinese History</i>), issue no. 2, pp. 17–69 (2012).</p></li><li id="liu93">[<span class="ref">Liu93</span>] Liú, Bǎolín (劉寶琳), 《100年袖珍干支月曆》 (<i>Pocket Edition of 100-Year Chinese Calendar</i>), 商務印書館(香港) (The Commercial Press, Hong Kong), 1993.</li><li id="GBT33661">[<span class="ref">PMO17</span>] <a href="http://www.nongli.net/cn/11028.html" target="_blank">《农历的编算和颁行》("Calculation and promulgation of the Chinese calendar")</a>, revised version (June 28, 2017), issued jointly by General Administration of Quality Supervision, Inspection and Quarantine of the People's Republic of China and Standardization Administration of the People's Republic of China, drafted by <a href="https://en.wikipedia.org/wiki/Purple_Mountain_Observatory" target="_blank">Purple Mountain Observatory</a>;<br><a href="http://www.pmo.cas.cn/xwdt2019/kpdt2019/202203/P020240201504886119982.pdf" target="_blank">"国家标准《农历的编算和颁行》解读材料" ("Explanatory material for 'Calculation and promulgation of the Chinese calendar'")</a>, Purple Mountain Observatory, Chinese Academy of Science.</li><li id="pmo86">[<span class="ref">PMO86</span>] 《新编万年历(修定本)》 (<i>New Edition of Wànniánlì</i>, revised edition), edited by 中国科学院紫金山天文台 (Purple Mountain Observatory, CAS), 科学普及出版社 (Popular Science Press), 1986.</li><li id="sm2016">[<span class="ref">SM16</span>] F.R. Stephenson, L.V. Morrison, and C.Y. Hohenkerk, <a href="https://royalsocietypublishing.org/doi/10.1098/rspa.2016.0404" target="_blank">Measurement of the Earth's rotation: 720 BC to AD 2015</a>, Proc. R. Soc. A., 472:20160404 (2016); L.V. Morrison, F.R. Stephenson, C.Y. Hohenkerk, and M. Zawilski, <a href="https://royalsocietypublishing.org/doi/10.1098/rspa.2020.0776" target="_blank">Addendum 2020 to 'Measurement of the Earth's rotation: 720 BC to AD 2015'</a>, Proc. R. Soc. A., 477:20200776 (2021). See also the <a href="http://astro.ukho.gov.uk/nao/lvm/" target="_blank">HMNAO Earth rotation webpage</a> for a summary of their results.</li><li id="vondrak11"><p>[<span class="ref">Vondrák</span>] J. Vondrák, N. Capitaine, P. Wallace, <a href="https://ui.adsabs.harvard.edu/abs/2011A%26A...534A..22V/abstract" target="_blank">"New precession expressions, valid for long time intervals"</a>, Astron. Astrophys., 534, A22 (2011).</p></li><li id="xiaoan"><p>[<span class="ref">Xiaoan</span>] Many scholars at that time objected using dingqi for calendar calculation and intercalation. Two of the famous scholars were Wáng Xīchǎn (王錫闡) and Méi Wéndǐng (梅文鼎). Wáng not only criticized using dingqi for intercalation, but only pointed out a sneaky thing the Imperial Astronomical Bureau did in order to avoid being ridiculed. He pointed out that there was a leap month after month 7 in <span class="nowrap">N<sub>1661</sub></span>, but then two major solar terms Z11 (Winter Solstice) and Z12 (Great Cold) appeared in month 11. The subsequent major solar term Z1 (Rain Water) was originally placed on the last day of month 12, but then the first month of <span class="nowrap">N<sub>1662</sub></span> would not contain any major solar term. The Astronomical Bureau decided to move the New Year Day a day earlier so that it would contain Z1, thus moving the month without major solar term to the last month of <span class="nowrap">N<sub>1661</sub></span>. Looking at the imperial planetary almanac for <span class="nowrap">N<sub>1662</sub></span> on the <a href="https://qingarchives.npm.edu.tw/index.php" target="_blank">Digital Library of Qing Archives</a> managed by the National Palace Museum in Taiwan, I see that the month 1 conjunction was listed on a yǐ hài day (18 February, 1662). However, from the positions of the Sun and Moon given by the almanac, it's clear that the conjunction should have been on the following day (19 February). This cofirms Wáng's claim. Such a sneaky operation was only done once. There were seven more cases in the Qing calendars where two months without a major solar term appearing within several months. One such case occurred in the first month of <span class="nowrap">N<sub>1833</sub></span>. The situation was exactly the same as that of <span class="nowrap">N<sub>1662</sub></span> originally planned: the major solar term Z1 appeared on the last day of month 12 in <span class="nowrap">N<sub>1832</sub></span> and there was no major solar term in the first month of <span class="nowrap">N<sub>1833</sub></span>. The conjunction date was not altered in this case. After the fall of the Qing dynasty, the first month of <span class="nowrap">N<sub>1985</sub></span> also did not contain a major solar term. The first month of <span class="nowrap">N<sub>2034</sub></span> won't contain a major solar term either.</p><p>The history of the controversies on using dingqi in calendar calculation was similar to the situation of using dingshuo (true lunar conjunction) in calendar calculation. Before the 7th century, lunar conjunctions in a calendar were calculated based on Moon's mean motion, which were called the pingshuo (mean conjunctions). In the fifth century, astronomer Hé Chéngtiān (何承天) advocated using dingshuo in calendar calculation. However, the frequent appearances of three consecutive long months and two consecutive short months were strongly opposed by other people and dingshuo was not implemented. In 619, the <i>Wuyinyuan</i> astronomical canon (戊寅元曆) broke the tradition and used dingshuo in calendar calculation, but dingshuo was abandoned after the appearance of four consecutive long months in 645. About 20 years later, the <i>Linde</i> astronomical canon (麟德曆) reintroduced dingshuo, but a new <i>jinshuo</i> rule (進朔法) was introduced to reduce the frequency of several consecutive long and short months. This rule was also adopted by the subsequent astronomical canons until 1281 when the <i>Shòushí</i> canon (授時曆) abolished the rule. At that time, no one cared about four consecutive long months or three consecutive short months. Today, some people don't even know that sometimes four consecutive long months appear in the Chinese calendar. Even though dingqi has been used in calendar calculation for almost 400 years, some people still criticize it to this day and advocate the restoration of pingqi. However, these people don't advocate the restoration of pingshuo.</p></li><li id="Zhang1978"><p>[<span class="ref">Zhang78</span>] Zhāng, Péiyú (張培瑜), "Hàn chū lì fǎ tǎo lùn" (汉初历法讨论 or "On the calendar system in the early Han dynasty"), in <i>Zhōng Guó Tiān Wén Xué Shǐ Wén Jí</i> (《中国天文学史文集》 or <i>A Collection of Essays on the History of Chinese Astronomy</i>), Science Press (Beijing), April 1978, pp. 82–94.</p></li><li id="Zhang1987"><p>[<span class="ref">Zhang87</span>] Zhāng, Péiyú (張培瑜), <i>Zhōng Guó Xiān Qín Shǐ Lìbiǎo</i> (《中国先秦史历表》 or <i>Tables of Chinese Calendars in the Pre-Qin Period</i>), Shandong Qilu Press, June 1987.</p></li><li id="Zhang1997"><p>[<span class="ref">Zhang97</span>] Zhāng, Péiyú (張培瑜), <i>Sānqiān Wǔbǎiniǎn Lìrì Tiānxiàng</i> (《三千五百年历日天象》 or <i>3500 Years of Calendars and Astronomical Phenomena</i>), Elephant Press, July 1997.</p></li><li id="ZCBH2008"><p>[<span class="ref">ZCBH</span>] Zhāng, Péiyú (張培瑜), Chén, Měidōng (陳美東), Bó, Shùrén (薄樹人), and Hú, Tiězhū (胡鐵珠), <i>Zhōng Guó Gǔdài Lìfǎ</i> (《中国古代历法》 or <i>Ancient Chinese Calendars and Almanacs</i>), China Science Press (Beijing), March 2008.</p></li><li id="Zheng1936"><p>[<span class="ref">Zheng</span>] Zheng, Hesheng (鄭鶴聲), <i>Jìn shì zhōng xī shǐ rì duì zhào biǎo</i> (《近世中西史日對照表》 or <i>A Chinese calendar translated into the western calendar from 1516 to 1941</i>), The Commercial Press, 1936; reprinted by Xinhua Bookstore (Beijing) in 1981.</p></li></ul><br></div><noscript><h2>Oops!</h2><p>You must enable JavaScript to use this page.</p><p>Please enable JavaScript and reload.</p></noscript><script>header(0,"computation","computation"),document.getElementById("wrapper0").style.display="block"</script></body></html>