diff --git a/rules.html b/rules.html index cc10ab9..783881b 100755 --- a/rules.html +++ b/rules.html @@ -1 +1 @@ -Rules for the Chinese Calendar

Rules for the Chinese Calendar

First draft: October, 2018       Last major update: April, 2019


China officially adopted the Gregorian calendar since 1912. However, Chinese people still use the traditional Chinese calendar (農曆) today. Many Chinese festivals and some public holidays are still based on the Chinese calendar. It is therefore useful to understand how the Chinese calendar works. This page intends to give only a brief introduction to the Chinese calendar. For a more detail and comprehensive introduction to the subject, I suggest Helmer Aslaksen's wonderful article "Mathematics of the Chinese calendar"[Aslaksen10] and the article "The Chinese calendar and its operational rules"[Liu-Stephenson98a] by Baolin Liu and Richard Stephenson. Another nice article is Section 15.8 in the book Explanatory Supplement to the Astronomical Almanac[Richards13]. The best Chinese reference I know of is the book 历书百问百答 (Calendars: 100 Questions and Answers)[Tang86] by Táng Hànliáng (唐汉良).


Contents

  1. Introduction
  2. Important Concepts
    1. UT1, UTC, and China Standard Time
    2. Counting Years, Months and Days
    3. Lunar Conjunction (New Moon)
    4. Major Solar Terms and Suì
  3. Rules for the Modern Chinese Calendar
  4. Examples of Computing the Chinese Calendar
    1. Example 1: N2017
    2. Example 2: N2033
    3. The Exceptional Year N2033
  5. Why Do the Rules Work?
    1. Matching Two Cycles
    2. Myth of the 19-Year Cycle
    3. Average Length of Chinese Month and Year
  6. New Standards 2017 (GB/T 33661-2017)

       Footnotes and References



Introduction

Calendars were created to keep track of time. There are three cycles occurring in nature that were important to people in the ancient time. They are the cycle of day and night, the cycle of moon phases (lunar cycle) and the cycle of seasons (solar cycle). The cycle of day and night can be characterized by the average value of a solar day, which is the average time between two successive solar noons. The lunar cycle can be characterized by the average time between two successive new moons, or the synodic month. The cycle of seasons can be characterized by the tropical year, which is approximately the average time between two successive winter solstices (or between two successive vernal equinoxes)[fn1]. The concept of a day is directly related to the cycle of day and night. The concept of a month is (at least initially) related to the lunar cycle, and the concept of a year is related to the cycle of seasons.

One synodic month has 29.5306 days and one tropical year has 365.2422 days. None of these three cycles are commensurate with each other (i.e. none of the ratios of any pair of the cycles is a rational number). The challenge is to derive a scheme to arrange days into months and years to keep track of the other two cycles. One approach is to ignore the lunar cycle and only keep track of the cycle of seasons. This is called a solar calendar because its arrangement of days and months in a year depends only on the position of the Sun on the ecliptic. Gregorian calendar is an example of a solar calendar. Another approach is to ignore the cycle of seasons and only keep track of moon phases. The resulting calendar is called a lunar calendar. Islamic calendar is an example of a lunar calendar. The third approach is to keep track of all of the other two cycles. The resulting calendar is called a luni-solar calendar. The Chinese calendar is an example of a luni-solar calendar.

In Chinese calendar, the first day of a month is determined by the day of the lunar conjunction (new moon). Since the synodic month is 29.5306 days, a Chinese month can have 29 days (short month) or 30 days (long month), depending on the number of days between the dates of two successive new moons. One tropical year has 365.2422 days. Therefore, there are on average 12.37 Chinese months in a tropical year. A Chinese year normally has 12 months. To keep the calendar in sync with seasons, an extra month has to be inserted to the year about every 3 years, in which case there are 13 months in the year. This extra month is called a leap (intercalary) month.

The challenge is to derive a scheme to insert a leap month so that a Chinese year is close to the tropical year on average. Various schemes were used over the history of China. There were five significant reforms in the Chinese calendar. The last one occurred in 1645. Here I only talk about the rules applied to the modern Chinese calendar. Several important concepts need to be explained first before describing the rules.


Important Concepts

To fully understand how the modern Chinese calendar works, we need to first understand how we measure time today.


UT1, UTC, and China Standard Time

Universal Time (UT) is a time standard based on Earth's rotation with respect to the Sun. There are several versions of universal time. The most commonly used are UT1 and the Coordinated Universal Time (UTC). UT1 is based on the orientation of a reference meridian[fn2] on Earth's surface relative to distant stars, and then use a simple transformation to obtain a time standard in accord with the mean solar time. The problem is that Earth's rotation is not uniform, which makes UT1 inconvenient for many applications. As a result, the Coordinated Universal Time (UTC) is introduced to approximate UT1.

UTC is defined by two components: International Atomic Time (TAI) and UT1. TAI is a weighted average of the time kept by over 400 atomic clocks in over 50 national laboratories worldwide. Each second of in a TAI is a constant. UTC is defined to be TAI plus an integer number of seconds. The duration of one second in UTC is therefore exactly equal to one TAI second. Leap seconds are added to ensure that the difference between UTC and UT1 is smaller than 0.9 seconds. Leap seconds are usually inserted to the last minute on June 30 at 23:59:59 UTC or on December 31 at 23:59:59 UTC of a year. In principle, a leap second can be positive or negative. The minute with a positive leap second has 61 seconds and the minute with a negative leap second has only 59 seconds. So far only positive leap seconds appear. As of today (October 2018), a total of 27 leap seconds have been inserted since the system of adjustment was implemented in 1972. The most recent leap second occurred on December 31, 2016 at 23:59:60 UTC. Thus, time in UTC is uniform, except for occasional "glitches" when leap seconds are added. These "glitches" cause some problems and there have been discussions on the abolishment of leap seconds since 2005.

Civil time is related to UTC by a UTC offset. A UTC offset is a multiple of 15 minutes, and the majority of offsets are in whole hours. As far as the Chinese calendar is concerned, the most important civil time is the China standard time, which is UTC+08:00, meaning that it is 8 hours ahead of UTC. This is the local time for the meridians of 120° East.


Counting Years, Months and Days

In Chinese calendar, years are counted in sexagenary cycle. Months are simply indicated by numbers 1, 2, 3, ..., 12. A leap month is indicated by the same number as the previous month, but a "leap" is added before the number. Days in a month are also simply indicated by 1, 2, 3, ..., 30. On my calendar page, dates in the Chinese calendar are indicated by MM-DD, where MM represents the month number and DD represents the day number in the month. Dates in a leap month are represented by leap MM-DD. For example, 11-15 means the 15th day of month 11. It should be noted that this MM-DD convention is not used everywhere else.


Lunar Conjunction (New Moon)

The lunar conjunction, or new moon, is the moment when the Moon and the Sun are in the same direction. The above description is too vague by modern standard. In modern astronomy, lunar conjunction (new moon) is defined as the time when the apparent geocentric longitude of the Moon λM is equal to the apparent geocentric longitude of the Sun λS. Three other related concepts are the first quarter, full moon (or lunar opposition) and third quarter. First quarter is defined as the time when λM - λS = 90° (modulo 360°); full moon is defined as the time when λM - λS = 180° (modulo 360°); third quarter is defined as the time when λM - λS = 270° (modulo 360°).

The day on which a new moon occurs is the day of the new moon. Note that in China days are measured from midnight to midnight, so 0:00:00 and 23:59:59.999 are considered to be on the same day. Also, times are measured in the China standard time (UTC+08:00). For example, a new moon occurred at UTC 17:36 on December 5, 2010. In China standard time, this new moon occurred at 01:36 on December 6, 2010. So the date of this new Moon was December 6, 2010.

One of the rules of the Chinese calendar is that the first day of a month must occur on the day of a new moon. Therefore, December 6, 2010 was the first day of a Chinese month. It was in fact the first day of month 11 (see below). The next new moon occurred on January 4, 2011 at 17:03 (UTC+8). So January 4, 2011 was the first day of a month. It was month 12. Since there were 29 days between December 6, 2010 and January 4, 2011, month 11 had 29 days. It was a short month.


Major Solar Terms and Suì

As explained in the 24 solar term page, ancient Chinese used the 24 solar terms to keep track of the Sun's position on the ecliptic. The 24 solar terms are grouped into 12 major solar terms and 12 minor solar terms. The major solar terms can be defined as the times when the apparent geocentric longitude of the Sun reaches integral multiples of 30°. The major solar terms are labelled by Z followed by a number on the 24 solar term page.

Winter solstice (Z11) is one of the major solar terms. It plays an important role in the Chinese calendar. As explained in the sexagenary cycle page, the zǐ month is defined as the month containing the winter solstice. Since the yín month is designated as the first month of a year, the zǐ month corresponds to month 11. Thus, month 11 always contains the winter solstice. For example, in 2010 the winter solstice occurred on December 22 at 07:38 (UTC+8). We mentioned above that a new moon occurred on December 6, 2010 and the following new moon was on January 4, 2011. The month starting on December 6 contained the winter solstice, so it was month 11.

As mentioned in the solar term page, the period between two successive winter solstices is called a suì. Suì can also be referred to a period starting on the first day of a zǐ month (month 11) and ending on the day before the first day of the next zǐ month. Simple calculations show that the number of months between the two "month 11"s (counting the first month 11 but not the second month 11) can be 12 or 13. If there are 12 months, I call the suì as a regular suì. If there are 13 months, I call the suì as a leap suì, using the terminology in Aslasken's articleAslaksen10. One of the rules in the Chinese calendar is that in a leap suì, one of the 13 months is a leap month.

In a regular suì, the 11 months following month 11 are assigned the numbers 12, 1, 2, ..., 10 and we are done in designating the months in a regular suì. In a regular suì, the Chinese new year is the first day of the second month after month 11, which is the day of the second new moon after the day of winter solstice.

Since there are 12 major solar terms in a suì and there are 13 months in a leap suì, it follows that at least one month in a leap suì does not contain a major solar term. Here is an important rule: in a leap suì, the first month (after month 11) that does not contain a major solar term is a leap month. In a leap suì, the 11 regular months (i.e. non-leap months) following month 11 are assigned the numbers 12, 1, 2, ..., 10. The leap month is assigned the same number as its preceding month. In a leap suì, the Chinese new year is the first day of the second regular month after month 11.


Rules for the Modern Chinese Calendar

Most of the rules have already been mentioned as the important concepts are explained. It is time to gather them together. The following is a summary of the rules.

  1. The instants of lunar conjunctions and solar terms are calculated for meridians of 120° East.
  2. The days are measured from midnight to midnight.
  3. The first day of a month is the day in which a conjunction of the Moon (new moon) falls.
  4. The winter solstice (Z11) always falls in month 11.
  5. If a suì contains 13 complete months, one of them is a leap month. This leap month is the first in the suì that contains no major solar term.
  6. The second month (not counting the leap month) after month 11 is the first month of a year.
  7. Years are counted in sexagenary year cycles.
  8. Months are assigned numbers 1 to 12; a leap month is assigned the same number as its predecessor but with the word "leap" added before the number.
  9. Days in a month are assigned numbers 1 to 29 or 30. Sexagenary days can also be used to indicate dates.

Except for Rules 1 and 5, all of the rest of the rules are passed down from ancient time. Rules 4 and 6 are the statement "the month containing the winter solstice is the zǐ month, and the yín month is designated as the first month" expressed in a language without referencing the branch name of a month (see Jiàn and the "Three Standards"). Rule 5, which was revised from an older rule, was created around the calendar reform in 1645, and Rule 1 was added in 1928.

Today Rule 1 simply means that times are expressed in UTC+8. However, UTC was invented in 1960. There were several changes in UTC until it was finalized in 1972. On my calendar page, times are given in UT1+8 before 1972 and UTC+8 in and after 1972. This has almost no effect because times are given to the nearest minute on the calendar page and the difference between UT1 and UTC was at most a few seconds between 1960 and 1972.

Rule 1 was only adopted since 1929. Before 1929, times were based on the Beijing meridian (116°25' East), which has a time difference of about 14 minutes with respect to the times based on the meridian of 120°E. If a solar term or new moon occurred close to the midnight, the date could be off by one day. For example, the new moon associated with the Chinese new year in 1916 occurred on February 4 at 00:05 (UT1+8), but the Chinese new year was celebrated on February 3 because the new moon was on February 3 at 23:51 according to the local time of the Beijing meridian.

It is easy to derive an algorithm to calculate the Chinese calendar based on these rules. For simplicity, I use the symbol NY to represent the Chinese year whose New Year day is closest to Jan. 1 in the Western year Y. The following shows the steps of determining each month in the suì SY from month 11 in NY-1 to the day before month 11 in NY

  1. Calculate the dates of the winter solstices WY-1 and WY in Gregorian years Y-1 and Y.
  2. Calculate the dates of the first lunar conjunction M-1 that occurs on or before WY-1, and the first lunar conjunction M11 that occurs on or before WY.
  3. Calculate the number of complete lunations LY between M-1 and M11. This is the integer closest to the number
    (M11 - M-1)/29.53.
    1. If LY = 12, there is no leap month in the suì SY. Calculate the dates of the 11 lunar conjunctions between M-1 and M11. Label them in chronological order as M0, M1, M2, ..., M10.
    2. If LY = 13, there is a leap month in the suì SY. Calculate the dates of 11 major solar terms between WY-1 and WY, and the dates of the 12 lunar conjunctions between M-1 and M11. Determine the first month after M-1 that does not contain a major solar term. This is the leap month. Label the dates of the 11 lunar conjunctions after M-1 that are not associated with the leap month in chronological order as M0, M1, M2, ..., M10. Label the date of the lunar conjunction associated with the leap month as M*i, where i is the month number of the previous month.
  4. M-1 is the first day of month 11 of in the Chinese year NY-1; M0 is the first day of month 12 in NY-1; M1 is the Chinese New Year of NY; M2, M3, ..., and M11 are the first days of month 2, month 3, ..., and month 11 in NY. If there is a leap month, the first day of the leap month is M*i.

These steps determine the months from month 11 in NY-1 to month 10 in NY. To determine the rest of the months in NY, one needs to go through the above steps for the suì SY+1.


Examples of Computing the Chinese Calendar
Why Do the Rules Work?
New Standards 2017 (GB/T 33661-2017)

In May 2017, the Chinese government issued a document (labelled GB/T 33661-2017) drafted by astronomers at the Purple Mountain Observatory (PMO) on new standards for computing the Chinese calendarPMO17. The reason for issuing this document is probably related to the following history.

In the past, the book Wànniánlì (萬年曆) was quite popular in China. Wànniánlì literally means ten-thousand-year calendar. However, the Chinese character wàn (萬) (literally means ten thousand) is often used to mean "many". So a better translation of Wànniánlì is Calendar Covering Many Years. According to the book New Edition of WànniánlìPMO86 edited by the PMO and the book Pocket Edition of 100-Year Chinese CalendarLiu93, Wànniánlì was edited by astronomers in the Imperial Astronomical Bureau (欽天監) of the Qīng dynasty. The first Wànniánlì contained Chinese calendar covering years from 1624 to 1835. In 1787, a new edition of the book was published, extending the years to 1935. From then on, every time a new emperor ascended to the throne, a new edition of Wànniánlì would be published, in which calendar up to about 200 years into the future would be calculated. The last Wànniánlì before the end of the Qīng dynasty was published in 1910, covering years up to 2108.

The Chinese government at that time, the Qīng government, issued the Shíxiàn Calendar every year, providing the official calendar for the upcoming year. Shíxiàn Calendar was also calculated by astronomers in the Imperial Astronomical Bureau. Sometimes they would modify the calendar data in Wànniánlì. For example, in the Shíxiàn Calendar for the year N1841, the first day of month 12 was one day earlier than that listed in the Wànniánlì published in 1799; in the Shíxiàn Calendar for the year N1856, the first day of month 11 was one day later than that listed in the Wànniánlì published in 1824; in the Shíxiàn Calendar for the year N1890, the first day of month 7 was one day later than that listed in the Wànniánlì published in 1862. These are just a few examples to show that Wànniánlì was not officially used even in the Qīng dynasty. According to Liu and Stephenson, the discrepancies between the dates in Wànniánlì and Shíxiàn Calendar arises from the fact that the dates in Wànniánlì appear to have been calculated using a simplified method.[Liu-Stephenson98b] When the times of the new moons were close to midnight, the dates calculated by Wànniánlì might occasionally fall on the wrong days.

In 1912, the Republic of China was established and adopted the Gregorian calendar as the official calendar. However, Chinese people still used the Chinese calendar and Wànniánlì was still popular. The Republic of China Calendar published by the Beiyang government of the Republic of China still listed the dates of the Chinese calendar in addition to the Gregorian calendar. In 1929, the Nationalist government tried to ban the use of the traditional Chinese calendar. The Kuómín Calendar published by the government no longer listed the dates of the Chinese calendar. However, Chinese people were used to the traditional calendar and many traditional customs were based on the Chinese calendar. The ban was not successful and was lifted in 1934.

Since there was no longer official version of the Chinese calendar, two different versions of Chinese calendar sometimes appeared and caused confusion. In 1953, there were two versions of Chinese calendars in China. One version was based on the Wànniánlì published in 1910 and the other version was based on the PMO calculation. The two versions gave different dates for the month 7 lunar conjunction: August 9 in the Wànniánlì version and August 10 in the PMO version. This caused considerable confusion throughout China. After this unfortunate event, the Chinese government decided to use the data calculated by PMO to compile all calendars throughout the country. In 1978, however, there were two different versions of Chinese calendar appearing in Hong Kong and southern China. One version was based on the PMO calculation. The other version, which was imported from Hong Kong, was based on Wànniánlì. According to the PMO version, the lunar conjunction associated with month 8 occurred at 0:09 (UTC+8) on Sep. 3, 1978. The old calendar, in which apparent solar time was calculated for the Beijing meridian, put the lunar conjunction on Sep. 2, 1978 a few minutes before midnight. This meant that there was one day difference between the two versions of the calendar on the first day of month 8. The 15th day of month 8 is called the mid-autumn festival, a harvest festival celebrated by the Chinese. As a result, the two versions of calendar led to two different dates of the mid-autumn festival in 1978. From then on, the Chinese calendars published in Hong Kong have been based on the PMO calculation. In 1989, there was a discrepancy again in the date of the month 7 lunar conjunction between Wànniánlì and PMO data. Fortunately, calendars in China and Hong Kong had been in sync by this time. However, this was not the case in Taiwan. Newspapers stated that the director of Taipei Astronomical Observatory confirmed that the PMO calculation was correct. As a result, many of the erroneous calendars for the year 1989 published in Taiwan were withdrawn by factories and shops on the island.

In May 2017, the Chinese government issued the document GB/T 33661-2017 to reconcile traditional calendrical practices with modern astronomical concepts. The rules for the Chinese calendar are the same as the ones stated above, but the astronomical concepts relevant to the calendar calculation are defined very precisely using modern terminologies following the IERS conventions. It also requires that calculations of the times of the 24 solar terms and lunar conjunctions must be accurate to about one second, excluding the unpublished leap seconds at the time of calculation. The document also requires that calendar data from 1912 to 2017 should refer to calendars published by the PMO. The Purple Mountain Observatory is also responsible for providing the official, most up-to-date calendar data for the upcoming year on a yearly basis. Thus, Chinese calendar has an official version again.

It is clearly a good thing to set unified standards for all Chinese calendar calculations to prevent confusion. However, the requirement of the one-second accuracy in the calculation of times of lunar conjunctions and 24 solar terms is baffling to me, because such accuracy is rarely, if ever, needed for calendar calculations. Let's take a closer look at this accuracy requirement.

What does it take to achieve a one second time accuracy? The 24 solar terms are defined as the times when the apparent longitude of the Sun reaches integer multiples of 15°. The mean longitude of the Sun increases by 360° in a tropical year (365.2422 days). This means that in one second, the Sun moves, on average, by 360°/(365.2422×86400) = 0.04" (0.04 arcseconds). To calculate the times of the 24 solar terms to within one second, we must calculate the position of the Sun to accuracy better than 0.04". For the lunar conjunction, a similar calculation shows that the accuracy requirement for the position of the Moon is about 360°/(29.5306×86400) = 0.5". No ephemerides in the world could achieve this level of accuracy until perhaps in the late 1970s. In addition, a precise definition of the ecliptic and equinoxes is needed to meet the accuracy requirement, which is the reason why the document has to specify precisely how the relevant astronomical terms are defined.

High accuracy is only required for the situations in which lunar conjunctions or solar terms occurring very close to the midnight. However, those situations will occur decades from now and even in those situations an accuracy of one second does not help. Note that the one-second accuracy does not account for the unknown leap seconds that will be added to the UTC, as specified by the GB/T 33661-2017 document. Times for lunar conjunctions and 24 solar terms can be computed very accurately in barycentric dynamical time (TDB), which is the time used in modern ephemerides. TDB is a uniform time scale defined by general relativity. To convert TDB to UTC, TDB can be first transformed to the terrestrial time (TT) using a transformation formula in general relativity. However, the difference between TDB and TT remains less than two milliseconds over several millennia and can be ignored in calendar calculations. TT is related to TAI described above by a constant offset: TT = TAI + 32.184 seconds. As mentioned above, UTC and TAI differ by an integral number of seconds. Hence we need to know the number of leap seconds that will be added to UTC in order to convert TDB to UTC. However, Earth's rotation is irregular and it is very difficult, if not impossible, to predict precisely the number of leap seconds that will be added to UTC decades ahead. This means that even though times in TDB can be calculated to within one second, their accuracy in UTC is still dominated by the uncertainty of the amount of leap seconds that will be added to UTC. Hence the accuracy of times in UTC+8 decreases with time even if we can compute the times in TDB with an accuracy of one second. The best approach to handle the situations in which lunar conjunctions or solar terms occurring very close to the midnight is to acknowledge that it is currently impossible to determine their exact dates, which is what this website does.

The situation in which lunar conjunctions and solar terms occurring near the midnight obviously also happened in the past. In the past, the definitions of lunar conjunction and solar terms were not as accurate as today's, and the methods used to compute their times were also less accurate. In addition, times based on the 120° East meridians were not imposed until 1929. Thus, there are inconsistencies in some of the dates of lunar conjunctions and solar terms between the calculations in the past and calculations using modern methods, which may result in discrepancies in the calculated Chinese calendar. In these situations, we should use the calendar issued by the government at that time. On this website, all printed times are based on calculations using the modern method, but the Chinese calendar (before ~2000) is based on the actual calendar issuded by the Chinese government. As for the 24 solar terms, the data based on the modern calculation and old calculations are both listed on my calendar page for years before 1733. The dates of the solar terms based on the old calculations are labelled as "calendrical solar terms", meaning solar terms calculated based on the astronomical system used at that time. 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.



Footnotes and References



\ No newline at end of file +Rules for the Chinese Calendar

Rules for the Chinese Calendar

First draft: October, 2018       Last major update: April, 2019


China officially adopted the Gregorian calendar since 1912. However, Chinese people still use the traditional Chinese calendar (農曆) today. Many Chinese festivals and some public holidays are still based on the Chinese calendar. It is therefore useful to understand how the Chinese calendar works. This page intends to give only a brief introduction to the Chinese calendar. For a more detail and comprehensive introduction to the subject, I suggest Helmer Aslaksen's wonderful article "Mathematics of the Chinese calendar"[Aslaksen10] and the article "The Chinese calendar and its operational rules"[Liu-Stephenson98a] by Baolin Liu and Richard Stephenson. Another nice article is Section 15.8 in the book Explanatory Supplement to the Astronomical Almanac[Richards13]. The best Chinese reference I know of is the book 历书百问百答 (Calendars: 100 Questions and Answers)[Tang86] by Táng Hànliáng (唐汉良).


Contents

  1. Introduction
  2. Important Concepts
    1. UT1, UTC, and China Standard Time
    2. Counting Years, Months and Days
    3. Lunar Conjunction (New Moon)
    4. Major Solar Terms and Suì
  3. Rules for the Modern Chinese Calendar
  4. Examples of Computing the Chinese Calendar
    1. Example 1: N2017
    2. Example 2: N2033
    3. The Exceptional Year N2033
  5. Why Do the Rules Work?
    1. Matching Two Cycles
    2. Myth of the 19-Year Cycle
    3. Average Length of Chinese Month and Year
  6. New Standards 2017 (GB/T 33661-2017)

       Footnotes and References



Introduction

Calendars were created to keep track of time. There are three cycles occurring in nature that were important to people in the ancient time. They are the cycle of day and night, the cycle of moon phases (lunar cycle) and the cycle of seasons (solar cycle). The cycle of day and night can be characterized by the average value of a solar day, which is the average time between two successive solar noons. The lunar cycle can be characterized by the average time between two successive new moons, or the synodic month. The cycle of seasons can be characterized by the tropical year, which is approximately the average time between two successive winter solstices (or between two successive vernal equinoxes)[fn1]. The concept of a day is directly related to the cycle of day and night. The concept of a month is (at least initially) related to the lunar cycle, and the concept of a year is related to the cycle of seasons.

One synodic month has 29.5306 days and one tropical year has 365.2422 days. None of these three cycles are commensurate with each other (i.e. none of the ratios of any pair of the cycles is a rational number). The challenge is to derive a scheme to arrange days into months and years to keep track of the other two cycles. One approach is to ignore the lunar cycle and only keep track of the cycle of seasons. This is called a solar calendar because its arrangement of days and months in a year depends only on the position of the Sun on the ecliptic. Gregorian calendar is an example of a solar calendar. Another approach is to ignore the cycle of seasons and only keep track of moon phases. The resulting calendar is called a lunar calendar. Islamic calendar is an example of a lunar calendar. The third approach is to keep track of all of the other two cycles. The resulting calendar is called a luni-solar calendar. The Chinese calendar is an example of a luni-solar calendar.

In Chinese calendar, the first day of a month is determined by the day of the lunar conjunction (new moon). Since the synodic month is 29.5306 days, a Chinese month can have 29 days (short month) or 30 days (long month), depending on the number of days between the dates of two successive new moons. One tropical year has 365.2422 days. Therefore, there are on average 12.37 Chinese months in a tropical year. A Chinese year normally has 12 months. To keep the calendar in sync with seasons, an extra month has to be inserted to the year about every 3 years, in which case there are 13 months in the year. This extra month is called a leap (intercalary) month.

The challenge is to derive a scheme to insert a leap month so that a Chinese year is close to the tropical year on average. Various schemes were used over the history of China. There were five significant reforms in the Chinese calendar. The last one occurred in 1645. Here I only talk about the rules applied to the modern Chinese calendar. Several important concepts need to be explained first before describing the rules.


Important Concepts

To fully understand how the modern Chinese calendar works, we need to first understand how we measure time today.


UT1, UTC, and China Standard Time

Universal Time (UT) is a time standard based on Earth's rotation with respect to the Sun. There are several versions of universal time. The most commonly used are UT1 and the Coordinated Universal Time (UTC). UT1 is based on the orientation of a reference meridian[fn2] on Earth's surface relative to distant stars, and then use a simple transformation to obtain a time standard in accord with the mean solar time. The problem is that Earth's rotation is not uniform, which makes UT1 inconvenient for many applications. As a result, the Coordinated Universal Time (UTC) is introduced to approximate UT1.

UTC is defined by two components: International Atomic Time (TAI) and UT1. TAI is a weighted average of the time kept by over 400 atomic clocks in over 50 national laboratories worldwide. Each second of in a TAI is a constant. UTC is defined to be TAI plus an integer number of seconds. The duration of one second in UTC is therefore exactly equal to one TAI second. Leap seconds are added to ensure that the difference between UTC and UT1 is smaller than 0.9 seconds. Leap seconds are usually inserted to the last minute on June 30 at 23:59:59 UTC or on December 31 at 23:59:59 UTC of a year. In principle, a leap second can be positive or negative. The minute with a positive leap second has 61 seconds and the minute with a negative leap second has only 59 seconds. So far only positive leap seconds appear. As of today (January 2024), a total of 27 leap seconds have been inserted since the system of adjustment was implemented in 1972. The most recent leap second occurred on December 31, 2016 at 23:59:60 UTC. Thus, time in UTC is uniform, except for occasional "glitches" when leap seconds are added. These "glitches" cause some problems and there have been discussions on the abolishment of leap seconds since 2005.

Civil time is related to UTC by a UTC offset. A UTC offset is a multiple of 15 minutes, and the majority of offsets are in whole hours. As far as the Chinese calendar is concerned, the most important civil time is the China standard time, which is UTC+08:00, meaning that it is 8 hours ahead of UTC. This is the local time for the meridians of 120° East.


Counting Years, Months and Days

In Chinese calendar, years are counted in sexagenary cycle. Months are simply indicated by numbers 1, 2, 3, ..., 12. A leap month is indicated by the same number as the previous month, but a "leap" is added before the number. Days in a month are also simply indicated by 1, 2, 3, ..., 30. On my calendar page, dates in the Chinese calendar are indicated by MM-DD, where MM represents the month number and DD represents the day number in the month. Dates in a leap month are represented by leap MM-DD. For example, 11-15 means the 15th day of month 11. It should be noted that this MM-DD convention is not used everywhere else.


Lunar Conjunction (New Moon)

The lunar conjunction, or new moon, is the moment when the Moon and the Sun are in the same direction. The above description is too vague by modern standard. In modern astronomy, lunar conjunction (new moon) is defined as the time when the apparent geocentric longitude of the Moon λM is equal to the apparent geocentric longitude of the Sun λS. Three other related concepts are the first quarter, full moon (or lunar opposition) and third quarter. First quarter is defined as the time when λM - λS = 90° (modulo 360°); full moon is defined as the time when λM - λS = 180° (modulo 360°); third quarter is defined as the time when λM - λS = 270° (modulo 360°).

The day on which a new moon occurs is the day of the new moon. Note that in China days are measured from midnight to midnight, so 0:00:00 and 23:59:59.999 are considered to be on the same day. Also, times are measured in the China standard time (UTC+08:00). For example, a new moon occurred at UTC 17:36 on December 5, 2010. In China standard time, this new moon occurred at 01:36 on December 6, 2010. So the date of this new Moon was December 6, 2010.

One of the rules of the Chinese calendar is that the first day of a month must occur on the day of a new moon. Therefore, December 6, 2010 was the first day of a Chinese month. It was in fact the first day of month 11 (see below). The next new moon occurred on January 4, 2011 at 17:03 (UTC+8). So January 4, 2011 was the first day of a month. It was month 12. Since there were 29 days between December 6, 2010 and January 4, 2011, month 11 had 29 days. It was a short month.


Major Solar Terms and Suì

As explained in the 24 solar term page, ancient Chinese used the 24 solar terms to keep track of the Sun's position on the ecliptic. The 24 solar terms are grouped into 12 major solar terms and 12 minor solar terms. The major solar terms can be defined as the times when the apparent geocentric longitude of the Sun reaches integral multiples of 30°. The major solar terms are labelled by Z followed by a number on the 24 solar term page.

Winter solstice (Z11) is one of the major solar terms. It plays an important role in the Chinese calendar. As explained in the sexagenary cycle page, the zǐ month is defined as the month containing the winter solstice. Since the yín month is designated as the first month of a year, the zǐ month corresponds to month 11. Thus, month 11 always contains the winter solstice. For example, in 2010 the winter solstice occurred on December 22 at 07:38 (UTC+8). We mentioned above that a new moon occurred on December 6, 2010 and the following new moon was on January 4, 2011. The month starting on December 6 contained the winter solstice, so it was month 11.

As mentioned in the solar term page, the period between two successive winter solstices is called a suì. Suì can also be referred to a period starting on the first day of a zǐ month (month 11) and ending on the day before the first day of the next zǐ month. Simple calculations show that the number of months between the two "month 11"s (counting the first month 11 but not the second month 11) can be 12 or 13. If there are 12 months, I call the suì as a regular suì. If there are 13 months, I call the suì as a leap suì, using the terminology in Aslasken's articleAslaksen10. One of the rules in the Chinese calendar is that in a leap suì, one of the 13 months is a leap month.

In a regular suì, the 11 months following month 11 are assigned the numbers 12, 1, 2, ..., 10 and we are done in designating the months in a regular suì. In a regular suì, the Chinese new year is the first day of the second month after month 11, which is the day of the second new moon after the day of winter solstice.

Since there are 12 major solar terms in a suì and there are 13 months in a leap suì, it follows that at least one month in a leap suì does not contain a major solar term. Here is an important rule: in a leap suì, the first month (after month 11) that does not contain a major solar term is a leap month. In a leap suì, the 11 regular months (i.e. non-leap months) following month 11 are assigned the numbers 12, 1, 2, ..., 10. The leap month is assigned the same number as its preceding month. In a leap suì, the Chinese new year is the first day of the second regular month after month 11.


Rules for the Modern Chinese Calendar

Most of the rules have already been mentioned as the important concepts are explained. It is time to gather them together. The following is a summary of the rules.

  1. The instants of lunar conjunctions and solar terms are calculated for meridians of 120° East.
  2. The days are measured from midnight to midnight.
  3. The first day of a month is the day in which a conjunction of the Moon (new moon) falls.
  4. The winter solstice (Z11) always falls in month 11.
  5. If a suì contains 13 complete months, one of them is a leap month. This leap month is the first in the suì that contains no major solar term.
  6. The second month (not counting the leap month) after month 11 is the first month of a year.
  7. Years are counted in sexagenary year cycles.
  8. Months are assigned numbers 1 to 12; a leap month is assigned the same number as its predecessor but with the word "leap" added before the number.
  9. Days in a month are assigned numbers 1 to 29 or 30. Sexagenary days can also be used to indicate dates.

Except for Rules 1 and 5, all of the rest of the rules are passed down from ancient time. Rules 4 and 6 are the statement "the month containing the winter solstice is the zǐ month, and the yín month is designated as the first month" expressed in a language without referencing the branch name of a month (see Jiàn and the "Three Standards"). Rule 5, which was revised from an older rule, was created around the calendar reform in 1645, and Rule 1 was added in 1928.

Today Rule 1 simply means that times are expressed in UTC+8. However, UTC was invented in 1960. There were several changes in UTC until it was finalized in 1972. On my calendar page, times are given in UT1+8 before 1972 and UTC+8 in and after 1972. This has almost no effect because times are given to the nearest minute on the calendar page and the difference between UT1 and UTC was at most a few seconds between 1960 and 1972.

Rule 1 was only adopted since 1929. Before 1929, times were based on the Beijing meridian (116°25' East), which has a time difference of about 14 minutes with respect to the times based on the meridian of 120°E. If a solar term or new moon occurred close to the midnight, the date could be off by one day. For example, the new moon associated with the Chinese new year in 1916 occurred on February 4 at 00:05 (UT1+8), but the Chinese new year was celebrated on February 3 because the new moon was on February 3 at 23:51 according to the local time of the Beijing meridian.

It is easy to derive an algorithm to calculate the Chinese calendar based on these rules. For simplicity, I use the symbol NY to represent the Chinese year whose New Year day is closest to Jan. 1 in the Western year Y. The following shows the steps of determining each month in the suì SY from month 11 in NY-1 to the day before month 11 in NY

  1. Calculate the dates of the winter solstices WY-1 and WY in Gregorian years Y-1 and Y.
  2. Calculate the dates of the first lunar conjunction M-1 that occurs on or before WY-1, and the first lunar conjunction M11 that occurs on or before WY.
  3. Calculate the number of complete lunations LY between M-1 and M11. This is the integer closest to the number
    (M11 - M-1)/29.53.
    1. If LY = 12, there is no leap month in the suì SY. Calculate the dates of the 11 lunar conjunctions between M-1 and M11. Label them in chronological order as M0, M1, M2, ..., M10.
    2. If LY = 13, there is a leap month in the suì SY. Calculate the dates of 11 major solar terms between WY-1 and WY, and the dates of the 12 lunar conjunctions between M-1 and M11. Determine the first month after M-1 that does not contain a major solar term. This is the leap month. Label the dates of the 11 lunar conjunctions after M-1 that are not associated with the leap month in chronological order as M0, M1, M2, ..., M10. Label the date of the lunar conjunction associated with the leap month as M*i, where i is the month number of the previous month.
  4. M-1 is the first day of month 11 of in the Chinese year NY-1; M0 is the first day of month 12 in NY-1; M1 is the Chinese New Year of NY; M2, M3, ..., and M11 are the first days of month 2, month 3, ..., and month 11 in NY. If there is a leap month, the first day of the leap month is M*i.

These steps determine the months from month 11 in NY-1 to month 10 in NY. To determine the rest of the months in NY, one needs to go through the above steps for the suì SY+1.


Examples of Computing the Chinese Calendar
Why Do the Rules Work?
New Standards 2017 (GB/T 33661-2017)

In May 2017, the Chinese government issued a document (labelled GB/T 33661-2017) drafted by astronomers at the Purple Mountain Observatory (PMO) on new standards for computing the Chinese calendarPMO17. The reason for issuing this document is probably related to the following history.

In the past, the book Wànniánlì (萬年曆) was quite popular in China. Wànniánlì literally means ten-thousand-year calendar. However, the Chinese character wàn (萬) (literally means ten thousand) is often used to mean "many". So a better translation of Wànniánlì is Calendar Covering Many Years. According to the book New Edition of WànniánlìPMO86 edited by the PMO and the book Pocket Edition of 100-Year Chinese CalendarLiu93, Wànniánlì was edited by astronomers in the Imperial Astronomical Bureau (欽天監) of the Qīng dynasty. The first Wànniánlì contained Chinese calendar covering years from 1624 to 1835. In 1787, a new edition of the book was published, extending the years to 1935. From then on, every time a new emperor ascended to the throne, a new edition of Wànniánlì would be published, in which calendar up to about 200 years into the future would be calculated. The last Wànniánlì before the end of the Qīng dynasty was published in 1910, covering years up to 2108.

The Chinese government at that time, the Qīng government, issued the Shíxiàn Calendar every year, providing the official calendar for the upcoming year. Shíxiàn Calendar was also calculated by astronomers in the Imperial Astronomical Bureau. Sometimes they would modify the calendar data in Wànniánlì. For example, in the Shíxiàn Calendar for the year N1841, the first day of month 12 was one day earlier than that listed in the Wànniánlì published in 1799; in the Shíxiàn Calendar for the year N1856, the first day of month 11 was one day later than that listed in the Wànniánlì published in 1824; in the Shíxiàn Calendar for the year N1890, the first day of month 7 was one day later than that listed in the Wànniánlì published in 1862. These are just a few examples to show that Wànniánlì was not officially used even in the Qīng dynasty. According to Liu and Stephenson, the discrepancies between the dates in Wànniánlì and Shíxiàn Calendar arises from the fact that the dates in Wànniánlì appear to have been calculated using a simplified method.[Liu-Stephenson98b] When the times of the new moons were close to midnight, the dates calculated by Wànniánlì might occasionally fall on the wrong days.

In 1912, the Republic of China was established and adopted the Gregorian calendar as the official calendar. However, Chinese people still used the Chinese calendar and Wànniánlì was still popular. The Republic of China Calendar published by the Beiyang government of the Republic of China still listed the dates of the Chinese calendar in addition to the Gregorian calendar. In 1929, the Nationalist government tried to ban the use of the traditional Chinese calendar. The Kuómín Calendar published by the government no longer listed the dates of the Chinese calendar. However, Chinese people were used to the traditional calendar and many traditional customs were based on the Chinese calendar. The ban was not successful and was lifted in 1934.

Since there was no longer official version of the Chinese calendar, two different versions of Chinese calendar sometimes appeared and caused confusion. In 1953, there were two versions of Chinese calendars in China. One version was based on the Wànniánlì published in 1910 and the other version was based on the PMO calculation. The two versions gave different dates for the month 7 lunar conjunction: August 9 in the Wànniánlì version and August 10 in the PMO version. This caused considerable confusion throughout China. After this unfortunate event, the Chinese government decided to use the data calculated by PMO to compile all calendars throughout the country. In 1978, however, there were two different versions of Chinese calendar appearing in Hong Kong and southern China. One version was based on the PMO calculation. The other version, which was imported from Hong Kong, was based on Wànniánlì. According to the PMO version, the lunar conjunction associated with month 8 occurred at 0:09 (UTC+8) on Sep. 3, 1978. The old calendar, in which apparent solar time was calculated for the Beijing meridian, put the lunar conjunction on Sep. 2, 1978 a few minutes before midnight. This meant that there was one day difference between the two versions of the calendar on the first day of month 8. The 15th day of month 8 is called the mid-autumn festival, a harvest festival celebrated by the Chinese. As a result, the two versions of calendar led to two different dates of the mid-autumn festival in 1978. From then on, the Chinese calendars published in Hong Kong have been based on the PMO calculation. In 1989, there was a discrepancy again in the date of the month 7 lunar conjunction between Wànniánlì and PMO data. Fortunately, calendars in China and Hong Kong had been in sync by this time. However, this was not the case in Taiwan. Newspapers stated that the director of Taipei Astronomical Observatory confirmed that the PMO calculation was correct. As a result, many of the erroneous calendars for the year 1989 published in Taiwan were withdrawn by factories and shops on the island.

In May 2017, the Chinese government issued the document GB/T 33661-2017 to reconcile traditional calendrical practices with modern astronomical concepts. The rules for the Chinese calendar are the same as the ones stated above, but the astronomical concepts relevant to the calendar calculation are defined very precisely using modern terminologies following the IERS conventions. It also requires that calculations of the times of the 24 solar terms and lunar conjunctions must be accurate to about one second, excluding the unpublished leap seconds at the time of calculation. The document also requires that calendar data from 1912 to 2017 should refer to calendars published by the PMO. The Purple Mountain Observatory is also responsible for providing the official, most up-to-date calendar data for the upcoming year on a yearly basis. Thus, Chinese calendar has an official version again.

It is clearly a good thing to set unified standards for all Chinese calendar calculations to prevent confusion. However, the requirement of the one-second accuracy in the calculation of times of lunar conjunctions and 24 solar terms is baffling to me, because such accuracy is rarely, if ever, needed for calendar calculations. Let's take a closer look at this accuracy requirement.

What does it take to achieve a one second time accuracy? The 24 solar terms are defined as the times when the apparent longitude of the Sun reaches integer multiples of 15°. The mean longitude of the Sun increases by 360° in a tropical year (365.2422 days). This means that in one second, the Sun moves, on average, by 360°/(365.2422×86400) = 0.04" (0.04 arcseconds). To calculate the times of the 24 solar terms to within one second, we must calculate the position of the Sun to accuracy better than 0.04". For the lunar conjunction, a similar calculation shows that the accuracy requirement for the position of the Moon is about 360°/(29.5306×86400) = 0.5". No ephemerides in the world could achieve this level of accuracy until perhaps in the late 1970s. In addition, a precise definition of the ecliptic and equinoxes is needed to meet the accuracy requirement, which is the reason why the document has to specify precisely how the relevant astronomical terms are defined.

High accuracy is only required for the situations in which lunar conjunctions or solar terms occurring very close to the midnight. However, those situations will occur decades from now and even in those situations an accuracy of one second does not help. Note that the one-second accuracy does not account for the unknown leap seconds that will be added to the UTC, as specified by the GB/T 33661-2017 document. Times for lunar conjunctions and 24 solar terms can be computed very accurately in barycentric dynamical time (TDB), which is the time used in modern ephemerides. TDB is a uniform time scale defined by general relativity. To convert TDB to UTC, TDB can be first transformed to the terrestrial time (TT) using a transformation formula in general relativity. However, the difference between TDB and TT remains less than two milliseconds over several millennia and can be ignored in calendar calculations. TT is related to TAI described above by a constant offset: TT = TAI + 32.184 seconds. As mentioned above, UTC and TAI differ by an integral number of seconds. Hence we need to know the number of leap seconds that will be added to UTC in order to convert TDB to UTC. However, Earth's rotation is irregular and it is very difficult, if not impossible, to predict precisely the number of leap seconds that will be added to UTC decades ahead. This means that even though times in TDB can be calculated to within one second, their accuracy in UTC is still dominated by the uncertainty of the amount of leap seconds that will be added to UTC. Hence the accuracy of times in UTC+8 decreases with time even if we can compute the times in TDB with an accuracy of one second. The best approach to handle the situations in which lunar conjunctions or solar terms occurring very close to the midnight is to acknowledge that it is currently impossible to determine their exact dates, which is what this website does.

The situation in which lunar conjunctions and solar terms occurring near the midnight obviously also happened in the past. In the past, the definitions of lunar conjunction and solar terms were not as accurate as today's, and the methods used to compute their times were also less accurate. In addition, times based on the 120° East meridians were not imposed until 1929. Thus, there are inconsistencies in some of the dates of lunar conjunctions and solar terms between the calculations in the past and calculations using modern methods, which may result in discrepancies in the calculated Chinese calendar. In these situations, we should use the calendar issued by the government at that time. On this website, all printed times are based on calculations using the modern method, but the Chinese calendar (before ~2000) is based on the actual calendar issuded by the Chinese government. As for the 24 solar terms, the data based on the modern calculation and old calculations are both listed on my calendar page for years before 1733. The dates of the solar terms based on the old calculations are labelled as "calendrical solar terms", meaning solar terms calculated based on the astronomical system used at that time. 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.



Footnotes and References



\ No newline at end of file diff --git a/rules_chinese.html b/rules_chinese.html index 6296911..31761cf 100755 --- a/rules_chinese.html +++ b/rules_chinese.html @@ -1 +1 @@ -農 曆 編 算 法 則

農 曆 編 算 法 則

初稿: 2018年10月     最近一次重大修訂: 2019年4月


中國自公元1912年(民國元年)起採用公曆(即格里高里曆),但是傳統的農曆仍在民間使用,而且大多數傳統節日及公眾假期仍依照農曆,所以有必要對農曆有基本認識。本網頁旨在簡單介紹農曆的編算法則。坊間有不少談論曆法的通俗書籍可供有興趣的讀者參閱,例如唐漢良先生的《历书百问百答》唐汉良


內容

  1. 引 言
  2. 重 要 概 念
    1. UT1, UTC, 中 國 標 準 時
    2. 農 曆 的 紀 年、紀 月 和 紀 日 法
    3. 中 氣 和 歲
  3. 現 代 農 曆 的 編 算 法 則
  4. 農 曆 編 算 例 子
    1. 例 一: 推 算 N2017 (丁 酉 年) 的 所 有 農 曆 月
    2. 例 二: 推 算 N2033 (癸 丑 年) 的 所 有 農 曆 月
    3. 異 常 的 年 份 N2033 (癸 丑 年)
  5. 農 曆 法 則 之 疑 惑
    1. 兼 顧 陰 陽 兩 週
    2. 十 九 年 七 閏 法 之 謎
    3. 農 曆 年 月 的 平 均 日 數
  6. 《農 曆 的 編 算 和 頒 行》: 2017 年 國 家 標 準 (GB/T 33661-2017)

    備註和參考文獻


引 言

曆法是為了紀錄時間而制。在古代,有三個週期對人們日常生活很重要:晝夜交替的週期、月亮盈虧的週期和季節交替的週期。晝夜交替的平均時間是平太陽日。月亮盈虧的週期是朔望月,其平均值是29.5306日。季節交替的週期是回歸年(古代稱「歲實」),可由兩冬至或兩春分的平均時間以定,其值為365.2422日註一。「日」的概念緣自晝夜交替,「月」的概念緣自月亮盈虧,「年」或「歲」的概念緣自季節交替。

曆法要解決的其中一個重要問題是怎樣編排年月日。上述三個週期彼此之間的比例都不能約化成簡單分數,這使編制曆法頗為困難。其中一個辦法是不理會朔望月,只考慮回歸年,年和月按特定規律編排,使一年的平均週期近似回歸年,這樣的曆法稱為「太陽曆」,簡稱「陽曆」,公曆就是一種陽曆。另一個辦法是不理會回歸年,年和月按特定的規律編排,使一個月的平均週期接近朔望月,這樣的曆法稱為「太陰曆」,簡稱「陰曆」,伊斯蘭曆就是一種陰曆。第三個辦法是要同時兼顧朔望月和回歸年,年和月按特定的規律編排,使一個月的平均週期接近朔望月,一年的平均週期接近回歸年,這樣的曆法稱為「陰陽合曆」,簡稱「陰陽曆」,農曆就是一種陰陽曆。

農曆規定把朔(即新月)落在的那一日定為某月初一。朔望月的平均值是29.5306日,所以農曆一個月可以有二十九日,稱為小月,也可以有三十日,稱為大月。月大月小是根據兩朔日之間的日數而定。回歸年的週期是365.2422日,是朔望月平均值的12.37倍,所以農曆一年一般有十二個月。為使農曆不偏離回歸年的週期,約每三年需有一個「閏月」,即一年有十三個月。

安置閏月以使農曆一年平均週期接近回歸年,即「置閏法則」,是農曆要解決的重要問題。歷代用過很多不同的置閏法則,有過五次重大的曆法改革,最近一次重大改革發生在清順治二年(公元1645年)。這裡只談現在通用農曆的法則,談法則之前須先闡釋對編算農曆來說重要的天文和曆法概念。


重 要 概 念

要深入了解現代農曆的編算,得從現代的時間計量說起。


UT1, UTC, 中 國 標 準 時

世界時(UT)是根據地球自轉制定的時間。世界時有幾種不同版本,最常用的是UT1和協調世界時(UTC)。UT1是先根據地球上某一特定的經線註二相對於遙遠恆星的方位,再通過簡單變換得出符合平均太陽時的時間標準。地球自轉不均勻,所以UT1的時間也不均勻,這使UT1在應用上有所不便,於是人們創立協調世界時UTC來取代UT1。

協調世界時UTC是由國際原子時TAI及UT1而定。國際原子時是根據遍布世界上超過五十個國家、超過四百臺原子鐘的時刻經過數據處理而定的時刻,由TAI所定的每一秒鐘都是均勻的。UTC則定為TAI加上整數秒,使之與UT1的偏差不超過0.9秒。所以UTC的一秒和TAI的一秒時間間隔完全一樣,當UTC與UT1的時刻相差快要超過0.9秒時,閏秒便會加到UTC上,閏秒可正可負,正閏秒的一分鐘有六十一秒,負閏秒的一分鐘只有五十九秒。到目前(2022年10月)為止的閏秒全是正閏秒。閏秒法則從1972年實施,到目前(2018年10月)為止總共加了二十七個閏秒,上一次閏秒是在2016年12月31日23時59分60秒UTC。所以UTC在大多數的時候是均勻的,只是在加閏秒時會有一秒的突變,這些突變有時會造成混亂,所以有人自2005年起建議取消閏秒

區時定為與協調世界時UTC相差某個特定的時間,是世界各國採用的時間系統。現在中國各地採用的時間是東八區的區時,與UTC數字上相差八小時(例如東八區9:00相當於 UTC 1:00 ),一般以UTC+8表示,也稱為北京時間或中國標準時。現在的農曆就是以UTC+8為時間基礎。


農 曆 的 紀 年、紀 月 和 紀 日 法

農曆現在以干支紀年。月份以正月、二月、三月……十二月表示,閏月取前一個月的月數在前面加上「閏」字,如閏三月、閏九月等。農曆每月第一日到第十日依次紀為初一、初二……初十,第十一日到第二十日依次紀為十一、十二……二十,第二十一日到第二十九日依次紀為二十一、二十二……二十九,或者簡紀為廿一、廿二……廿九,第三十日紀為三十。農曆也可用干支來紀日期,但月份一般不用干支。

眾所週知,以前中國常以帝王年號紀年,這種紀年方法到清朝滅亡後廢除。中華民國雖然用「民國」紀年,但民國紀的是公曆年而非農曆年,例如民國元年是指公元1912年,不是農曆壬子年。


朔是指月亮與太陽在同一方向的時刻,這說法過於籠統,現代天文學把朔定義為月球地心視黃經λM與太陽地心視黃經λS相等的時刻。與朔相關的概念有上弦、望和下弦。上弦是λM-λS=90°的時刻;望是λM-λS=180°的時刻;下弦是λM-λS=270°的時刻。籠統地說,上弦是月亮位於太陽以東90°的時候;望是月亮在太陽的相反方向的時候;下弦是月亮位於太陽以西90°的時候。

朔所在的日期稱為朔日。中國一直以來以午夜零時(古時稱子正)作為一天的開始,所以不論朔發生在某天的00:00:00或23:59:59.999,朔日仍視為同一天。值得注意的是現在農曆以UTC+8為時間基礎,例如朔曾發生在公元2010年12月5日UTC17:36,換成UTC+8區時,這次朔發生在2010年12月6日的01:36,所以這次朔日是在2010年12月6日。

農曆有一條古老法則一直沿用至今:朔日定為某月的初一日。所以2010年12月6日必是某月的初一日,下面要說的另一法則把此朔日定為十一月初一。下一個朔日發生在公元2011年1月4日,所以下一個月的初一是2011年1月4日。2010年12月6日和2011年1月4日之間有二十九日,由此推出這個十一月是小月。


中 氣 和 歲

二十四節氣網頁所述,中國古代用二十四節氣來表示太陽在黃道的位置。二十四節氣又分為十二個中氣和十二個節氣:自立春算起,單數的稱為節氣,雙數的稱為中氣。現代天文把中氣定義為太陽的地心視黃經達到30°的整數倍的時刻。

冬至是其中一個中氣,在農曆編算中相當重要。如六十干支網頁所述,冬至所在的月份定為建子。自漢武帝太初元年(即公元前104年)以來的歷代各朝一般以建寅為正月,所以建子是十一月,由此可知含冬至的月份必定是農曆十一月。例如2010年的冬至時刻是12月22日07:38(UTC+8),上面提到2010年12月6日和2011年1月4日皆是朔日,故此以2010年12月6日為初一的月份含有冬至,所以是該月是十一月。

二十四節氣網頁又指出「歲」與「年」在農曆是嚴格分開的。一歲是指從冬至到下一個冬至的時間。「歲」又可以指從建子月的初一日到下一個建子月之前的一日,即由十一月初一到下一個十一月初一前一日那段時間。一歲有十二或十三個月。為方便起見,這裡稱含十二個月的歲為「平歲」,稱含十三個月的歲為「閏歲」。農曆有一條重要法則:在閏歲的十三個月中,其中的一個月要定為閏月。

平歲的月份編排很簡單。如前所述,含冬至的那個月定為十一月,以後的十一個月依次定為十二月、正月、二月……十月。所以在平歲中正月是十一月(建子)後的第二個月,正月初一是冬至日後的第二個朔日。

閏歲的情況稍為複雜。一歲有十二個中氣,閏歲有十三個月,所以至少有一個月不含中氣,農曆規定冬至後第一個不含中氣的月份定為閏月。為方便起見,這裡且稱非閏月的月份為「平月」。在閏歲中含冬至的月份定為十一月,其餘十一個平月依次定為十二月、正月、二月……十月,閏月取前一個月的月數在前面加上「閏」字。在閏歲中正月是十一月以後的第二個平月。


現 代 農 曆 的 編 算 法 則

重要概念都說完了,現在要總結現代農曆的編算法則。下面列出的法則是根據中華人民共和國國家質量監督檢驗檢疫總局和中國國家標準化管理委員會聯合發佈的《農曆的編算和頒行》文件国标(編號GB/T 33661-2017),這文件是2017年5月由中國科學院紫金山天文臺擬定。以下用《國標》簡稱這文件。

除了法則一和法則五外,其他法則基本上是繼承古制。法則四和法則六其實就是「含冬至之月為建子,以建寅為正月」的另一寫法,這寫法取自《國標》,顯然是為了避談月建,卻不免使不熟識中國曆法者感到有點莫名其妙。法則五是順治二年(1645年)曆法改革時制定的,稍為修改了之前的「無中氣」置閏法則。法則一是1928年才加上的。

現在,法則一其實是說算農曆時應用UTC+8作為標準時。但是UTC在1960年制定,經過多次修改,到1972年才定下來。為了避免混亂,本網站所列的時間在1972年以前是UT1+8,從1972年起才用UTC+8。這其實幾乎沒有什麼關係,本網站列出的時間只列到分鐘,UT1和UTC在1960年和1971年間最多只有幾秒之差。

法則一到1929年起才實施,1929年前的時間以北京地方時為準,北京的經度是116°25',與東經120°標準時相差約十四分鐘。如果朔或節氣時刻接近午夜零時,十四分鐘之差可以使朔日或節氣之日有一日之差。例如有朔發生在公元1916年2月4日0:05(UT1+8),按北京地方時這朔發生在2月4日午夜前,所以朔日是2月3日,這朔日正好是農曆丙辰年的正月初一,所以中國在1916年2月3日慶祝農曆新年,而不是2月4日。

從上述法則可制定編算農曆的方法,下面列出的方法可用來編定一歲內的所有農曆月,即從某年十一月到下一年十月的所有農曆月日。為方便起見,以下用NY表示年首最接近公曆Y年1月1日的農曆年,例如N1984指農曆甲子年,始於公元1984年2月2日,終於1985年2月19日。用WY表示落在公曆Y年的冬至日期,SY則表示從NY-1的建子月到NY建子月之前一日的那段時間,即農曆的歲。

  1. 計算兩冬至的日期WY-1WY

  2. 計算在WY-1或之前的第一個朔日M-1和在WY或之前的第一個朔日M11

  3. 求從M-1M11之間的朔的數目LY(包括M-1但不包括M11),LY是最接近(M11 - M-1)/29.53的整數。

    1. 如果LY=12,則SY是平歲。計算M-1之後的十一個朔日,依次標以M0,M1,……,M10

    2. 如果LY=13,則SY是閏歲。計算M-1之後的十二個朔日及在SY內的所有中氣日期,然後找出最先出現不含中氣的月份,這個月份便是閏月。把平月的朔日日期依次標以M0,M1,……,M10,閏月的朔日日期則標以M*i,這裡i是閏月之前那個月的編號。

  4. M-1是農曆年NY-1的十一月初一,M0是十二月初一,M1是農曆年NY的正月初一,M2,……,M10是農曆年NY的二月初一,……,十月初一。如果有閏月,閏月的初一是M*i

上述程序定出從農曆年NY-1的十一月到農曆年NY十月的月日編排,如想推算農曆年NY的其餘月份,就要重複以上步驟來計算下一個歲SY+1的農曆月份。


農 曆 編 算 例 子
農 曆 法 則 之 疑 惑
《農 曆 的 編 算 和 頒 行》: 2017 年 國 家 標 準 (GB/T 33661-2017)

上面說到2017年5月中國科學院紫金山天文臺擬定了《農曆的編算和頒行》文件国标(編號GB/T 33661-2017),由中華人民共和國國家質量監督檢驗檢疫總局和中國國家標準化管理委員會聯合發佈。這《國標》文件的出現,應該和下面的歷史有關。

多年來,《萬年曆》在民間很流行。據中國科學院紫金山天文臺編的《新编万年历(修定本)》新编万年历和劉寶琳編的《100年袖珍干支月曆》劉寶琳所述,《萬年曆》是由清朝欽天監所編,正式書名是《御定萬年書》。第一部《萬年曆》在乾隆年間編成,年限是從清太祖天命九年(公元1624年,清朝入關前的第一個甲子年)到「乾隆一百年」(公元1835年)。乾隆五十二年(公元1787年)又編了一部《萬年曆》,把年限延長至「乾隆二百年」(公元1935年)。乾隆以後,凡新皇帝即位都會重編《萬年曆》,把年限延長至新皇帝年號的第二百年。所以《萬年曆》在嘉慶四年(公元1799年)、道光四年(公元1824年)、咸豐元年(公元1851年)、同治元年(公元1862年)、光緒二年(公元1876年)都有續修。最後一部《萬年曆》在宣統二年(公元1910年)編成,年限延長至「宣統二百年」(公元2108年)。

《萬年曆》雖然預推二百年的日曆,可是清政府每年頒行的曆書《大清時憲書》不根據《萬年曆》,《大清時憲書》有時會修正《萬年曆》的預推。例如嘉慶《萬年曆》預推嘉慶四十六年(實際是道光二十一年)十一月大、十二月小,十二月初一的日干支是辛巳(公元1842年1月12日),而《大清道光二十一年時憲書》改為十一月小、十二月大,十二月初一的日干支是庚辰(公元1842年1月11日);道光《萬年曆》預推道光三十六年(實際是咸豐六年)十月小、十一月大,十一月初一的日干支是甲寅(公元1856年11月27日),而《大清咸豐六年時憲書》改為十月大、十一月小,十一月初一的日干支是乙卯(公元1856年11月28日);同治《萬年曆》預推同治二十九年(實際是光緒十六年)六月小、七月大,七月初一的日干支是戊辰(公元1890年8月15日),而《大清光緒十六年時憲書》改為六月大、七月小,七月初一的日干支是己巳(公元1890年8月16日)。這樣的例子還有不少,說明《萬年曆》即使在清朝也不是正式採用。根據劉寶琳和Richard Stephenson的文章,[Liu-Stephenson98]《萬年曆》與《大清時憲書》的曆日差異是因為《萬年曆》顯然用了簡略算法計算日曆,當合朔時刻接近夜半零時,用簡略算法算出的朔日或會落在錯誤的日期。

公元1912年中華民國成立,宣佈改用公曆,但是農曆仍在民間流行。於是中國有兩個新年,民間對公曆新年反應冷淡,到了農曆新年卻非常熱鬧,當時有「民國的新年」和「國民的新年」說法。北洋政府頒行的《中華民國曆書》除了登載公曆外,仍然登載農曆。到了1929年,南京國民政府試圖禁止農曆在民間使用,國民政府頒行的《國民曆》不再登載農曆。但是人民已習慣了使用農曆,而且傳統習俗和節日都依據農曆,所以禁令難以實行。1934年,國民政府無奈表示「對於舊曆年關,除公務機關,民間習俗不宜過於干涉」,停止了強制廢除農曆。

由於政府不再頒行「官方農曆」,在民間流行的農曆有時會出現不同版本。1953年,中國大陸出現了兩種不同的日曆,一種根據宣統《萬年曆》載農曆六月小、七月大(七月初一在8月9日),另一種根據紫金山天文臺的資料載農曆六月大、七月小(七月初一在8月10日)。自此以後,內地出版的日曆大都根據紫金山天文臺的資料,而不再用《萬年曆》了。到了1978年在香港和廣州等地出現了兩種版本的農曆。根據紫金山天文臺編的農曆該年的八月初一在公曆9月3日(合朔時刻是00:09(UTC+8)),而香港和從香港運到廣州等地的一些日曆根據宣統《萬年曆》載八月初一在公曆9月2日,導致兩種版本的中秋節日期有一日差異。這朔日差異主要是由於宣統《萬年曆》計算的時間是根據北京的地方視時,推算的合朔時刻在9月3日零時之前數分鐘。從此以後,香港和內地都採用紫金山天文臺編的農曆。在1989年又出現了宣統《萬年曆》與紫金山天文臺對農曆七月初一的日期差異,此時香港與內地一致採用紫金山天文臺的資料,但在臺灣卻不然。經臺灣權威機構證實紫金山天文臺的數據正確後,臺灣出版的大量錯誤日曆遭收回。

《國標》的訂立,就是為了杜絕這些不同版本的農曆帶來的混亂。《國標》文件列出的農曆編算法則與順治二年(1645年)曆法改革所定的法則基本上一致,《國標》主要是用現代天文學嚴格定義曆算中涉及的天文學概念,比較專門的概念不便在文件中詳細說明,所以說要依照國際地球自轉和參考系服務規範(IERS Conventions)發佈的文件來詮釋那些專門概念。文件也規定朔和二十四節氣時刻計算精度應達到一秒(不計及編算時尚未正式公佈的閏秒),1912年至《國標》生效之日期(2017年9月1日)間的農曆日曆應參考紫金山天文臺編算的農曆。中國科學院會提前一年正式發佈農曆日曆的年度標準資料,所以農曆又有了「官方版」。《國標》主要目的是以現代天文學概念規範農曆的編算方法,訂立國家標準,杜絕錯誤的農曆經輾轉複製發行而給社會帶來混亂。

我認為訂立編算農曆國家標準是好事,但對其中的一秒計算精度要求感到困惑。編算曆法根本不需要把朔和節氣時間算到一秒,除非朔和節氣時間離午夜零時小於一秒,但這樣的情況絕少出現。要達到一秒精度要求,必須把太陽和月球的位置計算得很準確。太陽的平黃經在一回歸年增加360°,所以在一秒鐘的時間,太陽的視黃經平均來說增加360°/(365.2422×86400)=0.04"(即0.04弧秒)。所以要把二十四節氣的時刻算準到一秒,必須把太陽的視黃經算準到0.04"。同理,要把合朔時刻算準到一秒,月球的視黃經必須計算準到360°/(29.5306×86400)=0.5"。世界上預先編算的太陽和月球位置曆表,或許要到1970年代末才達到這樣的精度。另外,必須嚴格定義「視黃經」來配合這個精度要求,所以《國標》明確規定必須按國際地球自轉和參考系服務規範(IERS Conventions)定義的天球座標來計算太陽和月球的視黃經。

如前述,高精度的合朔和節氣時刻只有在少數情況下,當這些時刻接近午夜零時時才有必要。但是這些情況要在數十年後才會出現,而且現在對這些情況暫時無能為力,原因是現在不能把數十年後的合朔和節氣的UTC+8時刻很準確地算出。現代的準確曆表大多以質心力學時(barycentric dynamical time)TDB為時間標準。TDB是用廣義相對論來定義的均勻時間,用來計算月球和太陽系行星的位置。編算農曆要用UTC+8時間,所以必須把TDB轉化為UTC+8。這可先把TDB轉化為地球時(terrestrial time)TT,然後再把TT轉化為UTC+8。TDB與TT的轉換可用廣義相對論的變換公式計算,但是TDB與TT在數千年來的差異不大於二毫秒(即0.002秒),所以在編算曆法時可省略這一步,即把TDB與TT視為等同。而TT與國際原子時TAI有簡單的關係: TT=TAI+32.184秒,上面說過TAI和UTC相差整數秒,確實的秒差涉及到究竟有多少閏秒加到UTC上。所以要把TDB化為UTC+8,就要知道閏秒的數目,但是地球自轉不均勻,數十年後的閏秒數目難以準確預測。所以雖然現代的高精度曆表能把數十年後的合朔和節氣的TDB時刻計算得很準,但是其對應的UTC+8時刻還是不能準確算出。因此我們對數十年後接近午夜零時的合朔和二十四節氣日期暫時無能為力。面對這些少數的合朔和節氣,我認為最佳的處理方法是承認現在無法斷定這些合朔和節氣的日期,確實日期與現在推算的日期或會有一日之差。本網站就是用這樣的方法處理這些少數的合朔和節氣。

合朔和節氣時刻接近午夜零時的情況以前當然也曾發生,以前對合朔和節氣的定義沒有現在那麼精確,計算方法也沒有現在那麼準,而且在1929年以前的時刻也不用東經120°的標準時。所以用現在的方法計算以前的合朔和節氣日期有時與當時的計算結果不一致,而算出的農曆也可能與以前通行的日曆不一致。遇到這些情況時,應以當時政府頒行的日曆為準。本網站所列的月相和節氣時刻都是根據現代方法計算,但是歷代的農曆日期依照當時政府頒行的曆法。至於二十四節氣的日期,年曆網頁中在公元1733年以前列出以當時曆法計算的日期,稱為「曆書節氣」,1733年以後的曆書節氣根本上與現代計算的一致,所以略去不註,只有遇到與當時的曆書有不一致時才會用紅色字形註明。



備 註 和 參 考 文 獻



\ No newline at end of file +農 曆 編 算 法 則

農 曆 編 算 法 則

初稿: 2018年10月     最近一次重大修訂: 2019年4月


中國自公元1912年(民國元年)起採用公曆(即格里高里曆),但是傳統的農曆仍在民間使用,而且大多數傳統節日及公眾假期仍依照農曆,所以有必要對農曆有基本認識。本網頁旨在簡單介紹農曆的編算法則。坊間有不少談論曆法的通俗書籍可供有興趣的讀者參閱,例如唐漢良先生的《历书百问百答》唐汉良


內容

  1. 引 言
  2. 重 要 概 念
    1. UT1, UTC, 中 國 標 準 時
    2. 農 曆 的 紀 年、紀 月 和 紀 日 法
    3. 中 氣 和 歲
  3. 現 代 農 曆 的 編 算 法 則
  4. 農 曆 編 算 例 子
    1. 例 一: 推 算 N2017 (丁 酉 年) 的 所 有 農 曆 月
    2. 例 二: 推 算 N2033 (癸 丑 年) 的 所 有 農 曆 月
    3. 異 常 的 年 份 N2033 (癸 丑 年)
  5. 農 曆 法 則 之 疑 惑
    1. 兼 顧 陰 陽 兩 週
    2. 十 九 年 七 閏 法 之 謎
    3. 農 曆 年 月 的 平 均 日 數
  6. 《農 曆 的 編 算 和 頒 行》: 2017 年 國 家 標 準 (GB/T 33661-2017)

    備註和參考文獻


引 言

曆法是為了紀錄時間而制。在古代,有三個週期對人們日常生活很重要:晝夜交替的週期、月亮盈虧的週期和季節交替的週期。晝夜交替的平均時間是平太陽日。月亮盈虧的週期是朔望月,其平均值是29.5306日。季節交替的週期是回歸年(古代稱「歲實」),可由兩冬至或兩春分的平均時間以定,其值為365.2422日註一。「日」的概念緣自晝夜交替,「月」的概念緣自月亮盈虧,「年」或「歲」的概念緣自季節交替。

曆法要解決的其中一個重要問題是怎樣編排年月日。上述三個週期彼此之間的比例都不能約化成簡單分數,這使編制曆法頗為困難。其中一個辦法是不理會朔望月,只考慮回歸年,年和月按特定規律編排,使一年的平均週期近似回歸年,這樣的曆法稱為「太陽曆」,簡稱「陽曆」,公曆(格里高里曆)就是一種陽曆。另一個辦法是不理會回歸年,年和月按特定的規律編排,使一個月的平均週期接近朔望月,這樣的曆法稱為「太陰曆」,簡稱「陰曆」,伊斯蘭曆就是一種陰曆。第三個辦法是要同時兼顧朔望月和回歸年,年和月按特定的規律編排,使一個月的平均週期接近朔望月,一年的平均週期接近回歸年,這樣的曆法稱為「陰陽合曆」,簡稱「陰陽曆」,農曆就是一種陰陽曆。

農曆規定把朔(即新月)落在的那一日定為某月初一。朔望月的平均值是29.5306日,所以農曆一個月可以有二十九日,稱為小月,也可以有三十日,稱為大月。月大月小是根據兩朔日之間的日數而定。回歸年的週期是365.2422日,是朔望月平均值的12.37倍,所以農曆一年一般有十二個月。為使農曆不偏離回歸年的週期,約每三年需有一個「閏月」,即一年有十三個月。

安置閏月以使農曆一年平均週期接近回歸年,即「置閏法則」,是農曆要解決的重要問題。歷代用過很多不同的置閏法則,有過五次重大的曆法改革,最近一次重大改革發生在清順治二年(公元1645年)。這裡只談現在通用農曆的法則,談法則之前須先闡釋對編算農曆來說重要的天文和曆法概念。


重 要 概 念

要深入了解現代農曆的編算,得從現代的時間計量說起。


UT1, UTC, 中 國 標 準 時

世界時(UT)是根據地球自轉制定的時間。世界時有幾種不同版本,最常用的是UT1和協調世界時(UTC)。UT1是先根據地球上某一特定的經線註二相對於遙遠恆星的方位,再通過簡單變換得出符合平均太陽時的時間標準。地球自轉不均勻,所以UT1的時間也不均勻,這使UT1在應用上有所不便,於是人們創立協調世界時UTC來取代UT1。

協調世界時UTC是由國際原子時TAI及UT1而定。國際原子時是根據遍布世界上超過五十個國家、超過四百臺原子鐘的時刻經過數據處理而定的時刻,由TAI所定的每一秒鐘都是均勻的。UTC則定為TAI加上整數秒,使之與UT1的偏差不超過0.9秒。所以UTC的一秒和TAI的一秒時間間隔完全一樣,當UTC與UT1的時刻相差快要超過0.9秒時,閏秒便會加到UTC上,閏秒可正可負,正閏秒的一分鐘有六十一秒,負閏秒的一分鐘只有五十九秒。到目前(2024年1月)為止的閏秒全是正閏秒。閏秒法則從1972年實施,到目前為止總共加了二十七個閏秒,上一次閏秒是在2016年12月31日23時59分60秒UTC。所以UTC在大多數的時候是均勻的,只是在加閏秒時會有一秒的突變,這些突變有時會造成混亂,所以有人自2005年起建議取消閏秒

區時定為與協調世界時UTC相差某個特定的時間,是世界各國採用的時間系統。現在中國各地採用的時間是東八區的區時,與UTC數字上相差八小時(例如東八區9:00相當於 UTC 1:00 ),一般以UTC+8表示,也稱為北京時間或中國標準時。現在的農曆就是以UTC+8為時間基礎。


農 曆 的 紀 年、紀 月 和 紀 日 法

農曆現在以干支紀年。月份以正月、二月、三月……十二月表示,閏月取前一個月的月數在前面加上「閏」字,如閏三月、閏九月等。農曆每月第一日到第十日依次紀為初一、初二……初十,第十一日到第二十日依次紀為十一、十二……二十,第二十一日到第二十九日依次紀為二十一、二十二……二十九,或者簡紀為廿一、廿二……廿九,第三十日紀為三十。農曆也可用干支來紀日期,但月份一般不用干支。

眾所週知,以前中國常以帝王年號紀年,這種紀年方法到清朝滅亡後廢除。中華民國雖然用「民國」紀年,但民國紀的是公曆年而非農曆年,例如民國元年是指公元1912年,不是農曆壬子年。


朔是指月亮與太陽在同一方向的時刻,這說法過於籠統,現代天文學把朔定義為月球地心視黃經λM與太陽地心視黃經λS相等的時刻。與朔相關的概念有上弦、望和下弦。上弦是λM-λS=90°的時刻;望是λM-λS=180°的時刻;下弦是λM-λS=270°的時刻。籠統地說,上弦是月亮位於太陽以東90°的時候;望是月亮在太陽的相反方向的時候;下弦是月亮位於太陽以西90°的時候。

朔所在的日期稱為朔日。中國一直以來以午夜零時(古時稱子正)作為一天的開始,所以不論朔發生在某天的00:00:00或23:59:59.999,朔日仍視為同一天。值得注意的是現在農曆以UTC+8為時間基礎,例如朔曾發生在公元2010年12月5日UTC17:36,換成UTC+8區時,這次朔發生在2010年12月6日的01:36,所以這次朔日是在2010年12月6日。

農曆有一條古老法則一直沿用至今:朔日定為某月的初一日。所以2010年12月6日必是某月的初一日,下面要說的另一法則把此朔日定為十一月初一。下一個朔日發生在公元2011年1月4日,所以下一個月的初一是2011年1月4日。2010年12月6日和2011年1月4日之間有二十九日,由此推出這個十一月是小月。


中 氣 和 歲

二十四節氣網頁所述,中國古代用二十四節氣來表示太陽在黃道的位置。二十四節氣又分為十二個中氣和十二個節氣:自立春算起,單數的稱為節氣,雙數的稱為中氣。現代天文把中氣定義為太陽的地心視黃經達到30°的整數倍的時刻。

冬至是其中一個中氣,在農曆編算中相當重要。如六十干支網頁所述,冬至所在的月份定為建子。自漢武帝太初元年(即公元前104年)以來的歷代各朝一般以建寅為正月,所以建子是十一月,由此可知含冬至的月份必定是農曆十一月。例如2010年的冬至時刻是12月22日07:38(UTC+8),上面提到2010年12月6日和2011年1月4日皆是朔日,故此以2010年12月6日為初一的月份含有冬至,所以是該月是十一月。

二十四節氣網頁又指出「歲」與「年」在農曆是嚴格分開的。一歲是指從冬至到下一個冬至的時間。「歲」又可以指從建子月的初一日到下一個建子月之前的一日,即由十一月初一到下一個十一月初一前一日那段時間。一歲有十二或十三個月。為方便起見,這裡稱含十二個月的歲為「平歲」,稱含十三個月的歲為「閏歲」。農曆有一條重要法則:在閏歲的十三個月中,其中的一個月要定為閏月。

平歲的月份編排很簡單。如前所述,含冬至的那個月定為十一月,以後的十一個月依次定為十二月、正月、二月……十月。所以在平歲中正月是十一月(建子)後的第二個月,正月初一是冬至日後的第二個朔日。

閏歲的情況稍為複雜。一歲有十二個中氣,閏歲有十三個月,所以至少有一個月不含中氣,農曆規定冬至後第一個不含中氣的月份定為閏月。為方便起見,這裡且稱非閏月的月份為「平月」。在閏歲中含冬至的月份定為十一月,其餘十一個平月依次定為十二月、正月、二月……十月,閏月取前一個月的月數在前面加上「閏」字。在閏歲中正月是十一月以後的第二個平月。


現 代 農 曆 的 編 算 法 則

重要概念都說完了,現在要總結現代農曆的編算法則。下面列出的法則是根據中華人民共和國國家質量監督檢驗檢疫總局和中國國家標準化管理委員會聯合發佈的《農曆的編算和頒行》文件国标(編號GB/T 33661-2017),這文件是2017年5月由中國科學院紫金山天文臺擬定。以下用《國標》簡稱這文件。

除了法則一和法則五外,其他法則基本上是繼承古制。法則四和法則六其實就是「含冬至之月為建子,以建寅為正月」的另一寫法,這寫法取自《國標》,顯然是為了避談月建,卻不免使不熟識中國曆法者感到有點莫名其妙。法則五是順治二年(1645年)曆法改革時制定的,稍為修改了之前的「無中氣」置閏法則。法則一是1928年才加上的。

現在,法則一其實是說算農曆時應用UTC+8作為標準時。但是UTC在1960年制定,經過多次修改,到1972年才定下來。為了避免混亂,本網站所列的時間在1972年以前是UT1+8,從1972年起才用UTC+8。這其實幾乎沒有什麼關係,本網站列出的時間只列到分鐘,UT1和UTC在1960年和1971年間最多只有幾秒之差。

法則一到1929年起才實施,1929年前的時間以北京地方時為準,北京的經度是116°25',與東經120°標準時相差約十四分鐘。如果朔或節氣時刻接近午夜零時,十四分鐘之差可以使朔日或節氣之日有一日之差。例如有朔發生在公元1916年2月4日0:05(UT1+8),按北京地方時這朔發生在2月4日午夜前,所以朔日是2月3日,這朔日正好是農曆丙辰年的正月初一,所以中國在1916年2月3日慶祝農曆新年,而不是2月4日。

從上述法則可制定編算農曆的方法,下面列出的方法可用來編定一歲內的所有農曆月,即從某年十一月到下一年十月的所有農曆月日。為方便起見,以下用NY表示年首最接近公曆Y年1月1日的農曆年,例如N1984指農曆甲子年,始於公元1984年2月2日,終於1985年2月19日。用WY表示落在公曆Y年的冬至日期,SY則表示從NY-1的建子月到NY建子月之前一日的那段時間,即農曆的歲。

  1. 計算兩冬至的日期WY-1WY

  2. 計算在WY-1或之前的第一個朔日M-1和在WY或之前的第一個朔日M11

  3. 求從M-1M11之間的朔的數目LY(包括M-1但不包括M11),LY是最接近(M11 - M-1)/29.53的整數。

    1. 如果LY=12,則SY是平歲。計算M-1之後的十一個朔日,依次標以M0,M1,……,M10

    2. 如果LY=13,則SY是閏歲。計算M-1之後的十二個朔日及在SY內的所有中氣日期,然後找出最先出現不含中氣的月份,這個月份便是閏月。把平月的朔日日期依次標以M0,M1,……,M10,閏月的朔日日期則標以M*i,這裡i是閏月之前那個月的編號。

  4. M-1是農曆年NY-1的十一月初一,M0是十二月初一,M1是農曆年NY的正月初一,M2,……,M10是農曆年NY的二月初一,……,十月初一。如果有閏月,閏月的初一是M*i

上述程序定出從農曆年NY-1的十一月到農曆年NY十月的月日編排,如想推算農曆年NY的其餘月份,就要重複以上步驟來計算下一個歲SY+1的農曆月份。


農 曆 編 算 例 子
農 曆 法 則 之 疑 惑
《農 曆 的 編 算 和 頒 行》: 2017 年 國 家 標 準 (GB/T 33661-2017)

上面說到2017年5月中國科學院紫金山天文臺擬定了《農曆的編算和頒行》文件国标(編號GB/T 33661-2017),由中華人民共和國國家質量監督檢驗檢疫總局和中國國家標準化管理委員會聯合發佈。這《國標》文件的出現,應該和下面的歷史有關。

多年來,《萬年曆》在民間很流行。據中國科學院紫金山天文臺編的《新编万年历(修定本)》新编万年历和劉寶琳編的《100年袖珍干支月曆》劉寶琳所述,《萬年曆》是由清朝欽天監所編,正式書名是《御定萬年書》。第一部《萬年曆》在乾隆年間編成,年限是從清太祖天命九年(公元1624年,清朝入關前的第一個甲子年)到「乾隆一百年」(公元1835年)。乾隆五十二年(公元1787年)又編了一部《萬年曆》,把年限延長至「乾隆二百年」(公元1935年)。乾隆以後,凡新皇帝即位都會重編《萬年曆》,把年限延長至新皇帝年號的第二百年。所以《萬年曆》在嘉慶四年(公元1799年)、道光四年(公元1824年)、咸豐元年(公元1851年)、同治元年(公元1862年)、光緒二年(公元1876年)都有續修。最後一部《萬年曆》在宣統二年(公元1910年)編成,年限延長至「宣統二百年」(公元2108年)。

《萬年曆》雖然預推二百年的日曆,可是清政府每年頒行的曆書《大清時憲書》不根據《萬年曆》,《大清時憲書》有時會修正《萬年曆》的預推。例如嘉慶《萬年曆》預推嘉慶四十六年(實際是道光二十一年)十一月大、十二月小,十二月初一的日干支是辛巳(公元1842年1月12日),而《大清道光二十一年時憲書》改為十一月小、十二月大,十二月初一的日干支是庚辰(公元1842年1月11日);道光《萬年曆》預推道光三十六年(實際是咸豐六年)十月小、十一月大,十一月初一的日干支是甲寅(公元1856年11月27日),而《大清咸豐六年時憲書》改為十月大、十一月小,十一月初一的日干支是乙卯(公元1856年11月28日);同治《萬年曆》預推同治二十九年(實際是光緒十六年)六月小、七月大,七月初一的日干支是戊辰(公元1890年8月15日),而《大清光緒十六年時憲書》改為六月大、七月小,七月初一的日干支是己巳(公元1890年8月16日)。這樣的例子還有不少,說明《萬年曆》即使在清朝也不是正式採用。根據劉寶琳和Richard Stephenson的文章,[Liu-Stephenson98]《萬年曆》與《大清時憲書》的曆日差異是因為《萬年曆》顯然用了簡略算法計算日曆,當合朔時刻接近夜半零時,用簡略算法算出的朔日或會落在錯誤的日期。

公元1912年中華民國成立,宣佈改用公曆,但是農曆仍在民間流行。於是中國有兩個新年,民間對公曆新年反應冷淡,到了農曆新年卻非常熱鬧,當時有「民國的新年」和「國民的新年」說法。北洋政府頒行的《中華民國曆書》除了登載公曆外,仍然登載農曆。到了1929年,南京國民政府試圖禁止農曆在民間使用,國民政府頒行的《國民曆》不再登載農曆。但是人民已習慣了使用農曆,而且傳統習俗和節日都依據農曆,所以禁令難以實行。1934年,國民政府無奈表示「對於舊曆年關,除公務機關,民間習俗不宜過於干涉」,停止了強制廢除農曆。

由於政府不再頒行「官方農曆」,在民間流行的農曆有時會出現不同版本。1953年,中國大陸出現了兩種不同的日曆,一種根據宣統《萬年曆》載農曆六月小、七月大(七月初一在8月9日),另一種根據紫金山天文臺的資料載農曆六月大、七月小(七月初一在8月10日)。自此以後,內地出版的日曆大都根據紫金山天文臺的資料,而不再用《萬年曆》了。到了1978年在香港和廣州等地出現了兩種版本的農曆。根據紫金山天文臺編的農曆該年的八月初一在公曆9月3日(合朔時刻是00:09(UTC+8)),而香港和從香港運到廣州等地的一些日曆根據宣統《萬年曆》載八月初一在公曆9月2日,導致兩種版本的中秋節日期有一日差異。這朔日差異主要是由於宣統《萬年曆》計算的時間是根據北京的地方視時,推算的合朔時刻在9月3日零時之前數分鐘。從此以後,香港和內地都採用紫金山天文臺編的農曆。在1989年又出現了宣統《萬年曆》與紫金山天文臺對農曆七月初一的日期差異,此時香港與內地一致採用紫金山天文臺的資料,但在臺灣卻不然。經臺灣權威機構證實紫金山天文臺的數據正確後,臺灣出版的大量錯誤日曆遭收回。

《國標》的訂立,就是為了杜絕這些不同版本的農曆帶來的混亂。《國標》文件列出的農曆編算法則與順治二年(1645年)曆法改革所定的法則基本上一致,《國標》主要是用現代天文學嚴格定義曆算中涉及的天文學概念,比較專門的概念不便在文件中詳細說明,所以說要依照國際地球自轉和參考系服務規範(IERS Conventions)發佈的文件來詮釋那些專門概念。文件也規定朔和二十四節氣時刻計算精度應達到一秒(不計及編算時尚未正式公佈的閏秒),1912年至《國標》生效之日期(2017年9月1日)間的農曆日曆應參考紫金山天文臺編算的農曆。中國科學院會提前一年正式發佈農曆日曆的年度標準資料,所以農曆又有了「官方版」。《國標》主要目的是以現代天文學概念規範農曆的編算方法,訂立國家標準,杜絕錯誤的農曆經輾轉複製發行而給社會帶來混亂。

我認為訂立編算農曆國家標準是好事,但對其中的一秒計算精度要求感到困惑。編算曆法根本不需要把朔和節氣時間算到一秒,除非朔和節氣時間離午夜零時小於一秒,但這樣的情況絕少出現。要達到一秒精度要求,必須把太陽和月球的位置計算得很準確。太陽的平黃經在一回歸年增加360°,所以在一秒鐘的時間,太陽的視黃經平均來說增加360°/(365.2422×86400)=0.04"(即0.04弧秒)。所以要把二十四節氣的時刻算準到一秒,必須把太陽的視黃經算準到0.04"。同理,要把合朔時刻算準到一秒,月球的視黃經必須計算準到360°/(29.5306×86400)=0.5"。世界上預先編算的太陽和月球位置曆表,或許要到1970年代末才達到這樣的精度。另外,必須嚴格定義「視黃經」來配合這個精度要求,所以《國標》明確規定必須按國際地球自轉和參考系服務規範(IERS Conventions)定義的天球座標來計算太陽和月球的視黃經。

如前述,高精度的合朔和節氣時刻只有在少數情況下,當這些時刻接近午夜零時時才有必要。但是這些情況要在數十年後才會出現,而且現在對這些情況暫時無能為力,原因是現在不能把數十年後的合朔和節氣的UTC+8時刻很準確地算出。現代的準確曆表大多以質心力學時(barycentric dynamical time)TDB為時間標準。TDB是用廣義相對論來定義的均勻時間,用來計算月球和太陽系行星的位置。編算農曆要用UTC+8時間,所以必須把TDB轉化為UTC+8。這可先把TDB轉化為地球時(terrestrial time)TT,然後再把TT轉化為UTC+8。TDB與TT的轉換可用廣義相對論的變換公式計算,但是TDB與TT在數千年來的差異不大於二毫秒(即0.002秒),所以在編算曆法時可省略這一步,即把TDB與TT視為等同。而TT與國際原子時TAI有簡單的關係: TT=TAI+32.184秒,上面說過TAI和UTC相差整數秒,確實的秒差涉及到究竟有多少閏秒加到UTC上。所以要把TDB化為UTC+8,就要知道閏秒的數目,但是地球自轉不均勻,數十年後的閏秒數目難以準確預測。所以雖然現代的高精度曆表能把數十年後的合朔和節氣的TDB時刻計算得很準,但是其對應的UTC+8時刻還是不能準確算出。因此我們對數十年後接近午夜零時的合朔和二十四節氣日期暫時無能為力。面對這些少數的合朔和節氣,我認為最佳的處理方法是承認現在無法斷定這些合朔和節氣的日期,確實日期與現在推算的日期或會有一日之差。本網站就是用這樣的方法處理這些少數的合朔和節氣。

合朔和節氣時刻接近午夜零時的情況以前當然也曾發生,以前對合朔和節氣的定義沒有現在那麼精確,計算方法也沒有現在那麼準,而且在1929年以前的時刻也不用東經120°的標準時。所以用現在的方法計算以前的合朔和節氣日期有時與當時的計算結果不一致,而算出的農曆也可能與以前通行的日曆不一致。遇到這些情況時,應以當時政府頒行的日曆為準。本網站所列的月相和節氣時刻都是根據現代方法計算,但是歷代的農曆日期依照當時政府頒行的曆法。至於二十四節氣的日期,年曆網頁中在公元1733年以前列出以當時曆法計算的日期,稱為「曆書節氣」,1733年以後的曆書節氣根本上與現代計算的一致,所以略去不註,只有遇到與當時的曆書有不一致時才會用紅色字形註明。



備 註 和 參 考 文 獻



\ No newline at end of file diff --git a/rules_simp.html b/rules_simp.html index 2357b1d..93865be 100755 --- a/rules_simp.html +++ b/rules_simp.html @@ -1 +1 @@ -农 历 编 算 法 则

农 历 编 算 法 则

初稿: 2018年10月     最近一次重大修订: 2019年4月


中国自公元1912年(民国元年)起采用公历(即格里高里历),但是传统的农历仍在民间使用,而且大多数传统节日及公众假期仍依照农历,所以有必要对农历有基本认识。本网页旨在简单介绍农历的编算法则。坊间有不少谈论历法的通俗书籍可供有兴趣的读者参阅,例如唐汉良先生的《历书百问百答》唐汉良


内容

  1. 引 言
  2. 重 要 概 念
    1. UT1, UTC, 中 国 标 准 时
    2. 农 历 的 纪 年、纪 月 和 纪 日 法
    3. 中 气 和 岁
  3. 现 代 农 历 的 编 算 法 则
  4. 农 历 编 算 例 子
    1. 例 一: 推 算 N2017 (丁 酉 年) 的 所 有 农 历 月
    2. 例 二: 推 算 N2033 (癸 丑 年) 的 所 有 农 历 月
    3. 异 常 的 年 份 N2033 (癸 丑 年)
  5. 农 历 法 则 之 疑 惑
    1. 兼 顾 阴 阳 两 周
    2. 十 九 年 七 闰 法 之 谜
    3. 农 历 年 月 的 平 均 日 数
  6. 《农 历 的 编 算 和 颁 行》: 2017 年 国 家 标 准 (GB/T 33661-2017)

    备注和参考文献


引 言

历法是为了纪录时间而制。在古代,有三个周期对人们日常生活很重要:昼夜交替的周期、月亮盈亏的周期和季节交替的周期。昼夜交替的平均时间是平太阳日。月亮盈亏的周期是朔望月,其平均值是29.5306日。季节交替的周期是回归年(古代称「岁实」),可由两冬至或两春分的平均时间以定,其值为365.2422日注一。「日」的概念缘自昼夜交替,「月」的概念缘自月亮盈亏,「年」或「岁」的概念缘自季节交替。

历法要解决的其中一个重要问题是怎样编排年月日。上述三个周期彼此之间的比例都不能约化成简单分数,这使编制历法颇为困难。其中一个办法是不理会朔望月,只考虑回归年,年和月按特定规律编排,使一年的平均周期近似回归年,这样的历法称为「太阳历」,简称「阳历」,公历就是一种阳历。另一个办法是不理会回归年,年和月按特定的规律编排,使一个月的平均周期接近朔望月,这样的历法称为「太阴历」,简称「阴历」,伊斯兰历就是一种阴历。第三个办法是要同时兼顾朔望月和回归年,年和月按特定的规律编排,使一个月的平均周期接近朔望月,一年的平均周期接近回归年,这样的历法称为「阴阳合历」,简称「阴阳历」,农历就是一种阴阳历。

农历规定把朔(即新月)落在的那一日定为某月初一。朔望月的平均值是29.5306日,所以农历一个月可以有二十九日,称为小月,也可以有三十日,称为大月。月大月小是根据两朔日之间的日数而定。回归年的周期是365.2422日,是朔望月平均值的12.37倍,所以农历一年一般有十二个月。为使农历不偏离回归年的周期,约每三年需有一个「闰月」,即一年有十三个月。

安置闰月以使农历一年平均周期接近回归年,即「置闰法则」,是农历要解决的重要问题。历代用过很多不同的置闰法则,有过五次重大的历法改革,最近一次重大改革发生在清顺治二年(公元1645年)。这里只谈现在通用农历的法则,谈法则之前须先阐释对编算农历来说重要的天文和历法概念。


重 要 概 念

要深入了解现代农历的编算,得从现代的时间计量说起。


UT1, UTC, 中 国 标 准 时

世界时(UT)是根据地球自转制定的时间。世界时有几种不同版本,最常用的是UT1和协调世界时(UTC)。UT1是先根据地球上某一特定的经线注二相对于遥远恒星的方位,再通过简单变换得出符合平均太阳时的时间标准。地球自转不均匀,所以UT1的时间也不均匀,这使UT1在应用上有所不便,于是人们创立协调世界时UTC来取代UT1。

协调世界时UTC是由国际原子时TAI及UT1而定。国际原子时是根据遍布世界上超过五十个国家、超过四百台原子钟的时刻经过数据处理而定的时刻,由TAI所定的每一秒钟都是均匀的。UTC则定为TAI加上整数秒,使之与UT1的偏差不超过0.9秒。所以UTC的一秒和TAI的一秒时间间隔完全一样,当UTC与UT1的时刻相差快要超过0.9秒时,闰秒便会加到UTC上,闰秒可正可负,正闰秒的一分钟有六十一秒,负闰秒的一分钟只有五十九秒。到目前(2018年10月)为止的闰秒全是正闰秒。闰秒法则从1972年实施,到目前(2018年10月)为止总共加了二十七个闰秒,上一次闰秒是在2016年12月31日23时59分60秒UTC。所以UTC在大多数的时候是均匀的,只是在加闰秒时会有一秒的突变,这些突变有时会造成混乱,所以有人自2005年起建议取消闰秒

区时定为与协调世界时UTC相差某个特定的时间,是世界各国采用的时间系统。现在中国各地采用的时间是东八区的区时,与UTC数字上相差八小时(例如东八区9:00相当于 UTC 1:00 ),一般以UTC+8表示,也称为北京时间或中国标准时。现在的农历就是以UTC+8为时间基础。


农 历 的 纪 年、纪 月 和 纪 日 法

农历现在以干支纪年。月份以正月、二月、三月……十二月表示,闰月取前一个月的月数在前面加上「闰」字,如闰三月、闰九月等。农历每月第一日到第十日依次纪为初一、初二……初十,第十一日到第二十日依次纪为十一、十二……二十,第二十一日到第二十九日依次纪为二十一、二十二……二十九,或者简纪为廿一、廿二……廿九,第三十日纪为三十。农历也可用干支来纪日期,但月份一般不用干支。

众所周知,以前中国常以帝王年号纪年,这种纪年方法到清朝灭亡后废除。中华民国虽然用「民国」纪年,但民国纪的是公历年而非农历年,例如民国元年是指公元1912年,不是农历壬子年。


朔是指月亮与太阳在同一方向的时刻,这说法过于笼统,现代天文学把朔定义为月球地心视黄经λM与太阳地心视黄经λS相等的时刻。与朔相关的概念有上弦、望和下弦。上弦是λM-λS=90°的时刻;望是λM-λS=180°的时刻;下弦是λM-λS=270°的时刻。笼统地说,上弦是月亮位於太阳以东90°的时候;望是月亮在太阳的相反方向的时候;下弦是月亮位於太阳以西90°的时候。

朔所在的日期称为朔日。中国一直以来以午夜零时(古时称子正)作为一天的开始,所以不论朔发生在某天的00:00:00或23:59:59.999,朔日仍视为同一天。值得注意的是现在农历以UTC+8为时间基础,例如朔曾发生在公元2010年12月5日UTC17:36,换成UTC+8区时,这次朔发生在2010年12月6日的01:36,所以这次朔日是在2010年12月6日。

农历有一条古老法则一直沿用至今:朔日定为某月的初一日。所以2010年12月6日必是某月的初一日,下面要说的另一法则把此朔日定为十一月初一。下一个朔日发生在公元2011年1月4日,所以下一个月的初一是2011年1月4日。2010年12月6日和2011年1月4日之间有二十九日,由此推出这个十一月是小月。


中 气 和 岁

二十四节气网页所述,中国古代用二十四节气来表示太阳在黄道的位置。二十四节气又分为十二个中气和十二个节气:自立春算起,单数的称为节气,双数的称为中气。现代天文把中气定义为太阳的地心视黄经达到30°的整数倍的时刻。

冬至是其中一个中气,在农历编算中相当重要。如六十干支网页所述,冬至所在的月份定为建子。自汉武帝太初元年(即公元前104年)以来的历代各朝一般以建寅为正月,所以建子是十一月,由此可知含冬至的月份必定是农历十一月。例如2010年的冬至时刻是12月22日07:38(UTC+8),上面提到2010年12月6日和2011年1月4日皆是朔日,故此以2010年12月6日为初一的月份含有冬至,所以是该月是十一月。

二十四节气网页又指出「岁」与「年」在农历是严格分开的。一岁是指从冬至到下一个冬至的时间。「岁」又可以指从建子月的初一日到下一个建子月之前的一日,即由十一月初一到下一个十一月初一前一日那段时间。一岁有十二或十三个月。为方便起见,这里称含十二个月的岁为「平岁」,称含十三个月的岁为「闰岁」。农历有一条重要法则:在闰岁的十三个月中,其中的一个月要定为闰月。

平岁的月份编排很简单。如前所述,含冬至的那个月定为十一月,以后的十一个月依次定为十二月、正月、二月……十月。所以在平岁中正月是十一月(建子)后的第二个月,正月初一是冬至日后的第二个朔日。

闰岁的情况稍为复杂。一岁有十二个中气,闰岁有十三个月,所以至少有一个月不含中气,农历规定冬至后第一个不含中气的月份定为闰月。为方便起见,这里且称非闰月的月份为「平月」。在闰岁中含冬至的月份定为十一月,其余十一个平月依次定为十二月、正月、二月……十月,闰月取前一个月的月数在前面加上「闰」字。在闰岁中正月是十一月以后的第二个平月。


现 代 农 历 的 编 算 法 则

重要概念都说完了,现在要总结现代农历的编算法则。下面列出的法则是根据中华人民共和国国家质量监督检验检疫总局和中国国家标准化管理委员会联合发布的《农历的编算和颁行》文件国标(编号GB/T 33661-2017),这文件是2017年5月由中国科学院紫金山天文台拟定。以下用《国标》简称这文件。

除了法则一和法则五外,其他法则基本上是继承古制。法则四和法则六其实就是「含冬至之月为建子,以建寅为正月」的另一写法,这写法取自《国标》,显然是为了避谈月建,却不免使不熟识中国历法者感到有点莫名其妙。法则五是顺治二年(1645年)历法改革时制定的,稍为修改了之前的「无中气」置闰法则。法则一是1928年才加上的。

现在,法则一其实是说算农历时应用UTC+8作为标准时。但是UTC在1960年制定,经过多次修改,到1972年才定下来。为了避免混乱,本网站所列的时间在1972年以前是UT1+8,从1972年起才用UTC+8。这其实几乎没有什么关系,本网站列出的时间只列到分钟,UT1和UTC在1960年和1971年间最多只有几秒之差。

法则一到1929年起才实施,1929年前的时间以北京地方时为准,北京的经度是116°25',与东经120°标准时相差约十四分钟。如果朔或节气时刻接近午夜零时,十四分钟之差可以使朔日或节气之日有一日之差。例如有朔发生在公元1916年2月4日0:05(UT1+8),按北京地方时这朔发生在2月4日午夜前,所以朔日是2月3日,这朔日正好是农历丙辰年的正月初一,所以中国在1916年2月3日庆祝农历新年,而不是2月4日。

从上述法则可制定编算农历的方法,下面列出的方法可用来编定一岁内的所有农历月,即从某年十一月到下一年十月的所有农历月日。为方便起见,以下用NY表示年首最接近公历Y年1月1日的农历年,例如N1984指农历甲子年,始于公元1984年2月2日,终于1985年2月19日。用WY表示落在公历Y年的冬至日期,SY则表示从NY-1的建子月到NY建子月之前一日的那段时间,即农历的岁。

  1. 计算两冬至的日期WY-1WY

  2. 计算在WY-1或之前的第一个朔日M-1和在WY或之前的第一个朔日M11

  3. 求从M-1M11之间的朔的数目LY(包括M-1但不包括M11),LY是最接近(M11 - M-1)/29.53的整数。

    1. 如果LY=12,则SY是平岁。计算M-1之后的十一个朔日,依次标以M0,M1,……,M10

    2. 如果LY=13,则SY是闰岁。计算M-1之后的十二个朔日及在SY内的所有中气日期,然后找出最先出现不含中气的月份,这个月份便是闰月。把平月的朔日日期依次标以M0,M1,……,M10,闰月的朔日日期则标以M*i,这里i是闰月之前那个月的编号。

  4. M-1是农历年NY-1的十一月初一,M0是十二月初一,M1是农历年NY的正月初一,M2,……,M10是农历年NY的二月初一,……,十月初一。如果有闰月,闰月的初一是M*i

上述程序定出从农历年NY-1的十一月到农历年NY十月的月日编排,如想推算农历年NY的其余月份,就要重复以上步骤来计算下一个岁SY+1的农历月份。


农 历 编 算 例 子
农 历 法 则 之 疑 惑
《农 历 的 编 算 和 颁 行》: 2017 年 国 家 标 准 (GB/T 33661-2017)

上面说到2017年5月中国科学院紫金山天文台拟定了《农历的编算和颁行》文件国标(编号GB/T 33661-2017),由中华人民共和国国家质量监督检验检疫总局和中国国家标准化管理委员会联合发布。这《国标》文件的出现,应该和下面的历史有关。

多年来,《万年历》在民间很流行。据中国科学院紫金山天文台编的《新编万年历(修定本)》新编万年历和刘宝琳编的《100年袖珍干支月曆》刘宝琳所述,《万年历》是由清朝钦天监所编,正式书名是《御定万年书》。第一部《万年历》在乾隆年间编成,年限是从清太祖天命九年(公元1624年,清朝入关前的第一个甲子年)到「乾隆一百年」(公元1835年)。乾隆五十二年(公元1787年)又编了一部《万年历》,把年限延长至「乾隆二百年」(公元1935年)。乾隆以后,凡新皇帝即位都会重编《万年历》,把年限延长至新皇帝年号的第二百年。所以《万年历》在嘉庆四年(公元1799年)、道光四年(公元1824年)、咸丰元年(公元1851年)、同治元年(公元1862年)、光绪二年(公元1876年)都有续修。最后一部《万年历》在宣统二年(公元1910年)编成,年限延长至「宣统二百年」(公元2108年)。

《万年历》虽然预推二百年的日历,可是清政府每年颁行的历书《大清时宪书》不根据《万年历》,《大清时宪书》有时会修正《万年历》的预推。例如嘉庆《万年历》预推嘉庆四十六年(实际是道光二十一年)十一月大、十二月小,十二月初一的日干支是辛巳(公元1842年1月12日),而《大清道光二十一年时宪书》改为十一月小、十二月大,十二月初一的日干支是庚辰(公元1842年1月11日);道光《万年历》预推道光三十六年(实际是咸丰六年)十月小、十一月大,十一月初一的日干支是甲寅(公元1856年11月27日),而《大清咸丰六年时宪书》改为十月大、十一月小,十一月初一的日干支是乙卯(公元1856年11月28日);同治《万年历》预推同治二十九年(实际是光绪十六年)六月小、七月大,七月初一的日干支是戊辰(公元1890年8月15日),而《大清光绪十六年时宪书》改为六月大、七月小,七月初一的日干支是己巳(公元1890年8月16日)。这样的例子还有不少,说明《万年历》即使在清朝也不是正式采用。根据刘宝琳和Richard Stephenson的文章,[Liu-Stephenson98]《万年历》与《大清时宪书》的历日差异是因为《万年历》显然用了简略算法计算日历,当合朔时刻接近夜半零时,用简略算法算出的朔日或会落在错误的日期。

公元1912年中华民国成立,宣布改用公历,但是农历仍在民间流行。于是中国有两个新年,民间对公历新年反应冷淡,到了农历新年却非常热闹,当时有「民国的新年」和「国民的新年」说法。北洋政府颁行的《中华民国历书》除了登载公历外,仍然登载农历。到了1929年,南京国民政府试图禁止农历在民间使用,国民政府颁行的《国民历》不再登载农历。但是人民已习惯了使用农历,而且传统习俗和节日都依据农历,所以禁令难以实行。1934年,国民政府无奈表示「对于旧历年关,除公务机关,民间习俗不宜过于干涉」,停止了强制废除农历。

由于政府不再颁行「官方农历」,在民间流行的农历有时会出现不同版本。1953年,中国大陆出现了两种不同的日历,一种根据宣统《万年历》载农历六月小、七月大(七月初一在8月9日),另一种根据紫金山天文台的资料载农历六月大、七月小(七月初一在8月10日)。自此以后,内地出版的日历大都根据紫金山天文台的资料,而不再用《万年历》了。到了1978年在香港和广州等地出现了两种版本的农历。根据紫金山天文台编的农历该年的八月初一在公历9月3日(合朔时刻是00:09(UTC+8)),而香港和从香港运到广州等地的一些日历根据宣统《万年历》载八月初一在公历9月2日,导致两种版本的中秋节日期有一日差异。这朔日差异主要是由于宣统《万年历》计算的时间是根据北京的地方视时,推算的合朔时刻在9月3日零时之前数分钟。从此以后,香港和内地都采用紫金山天文台编的农历。在1989年又出现了宣统《万年历》与紫金山天文台对农历七月初一的日期差异,此时香港与内地一致采用紫金山天文台的资料,但在台湾却不然。经台湾权威机构证实紫金山天文台的数据正确后,台湾出版的大量错误日历遭收回。

《国标》的订立,就是为了杜绝这些不同版本的农历带来的混乱。《国标》文件列出的农历编算法则与顺治二年(1645年)历法改革所定的法则基本上一致,《国标》主要是用现代天文学严格定义历算中涉及的天文学概念,比较专门的概念不便在文件中详细说明,所以说要依照国际地球自转和参考系服务规范(IERS Conventions)发布的文件来诠释那些专门概念。文件也规定朔和二十四节气时刻计算精度应达到一秒(不计及编算时尚未正式公布的闰秒),1912年至《国标》生效之日期(2017年9月1日)间的农历日历应参考紫金山天文台编算的农历。中国科学院会提前一年正式发布农历日历的年度标准资料,所以农历又有了「官方版」。《国标》主要目的是以现代天文学概念规范农历的编算方法,订立国家标准,杜绝错误的农历经辗转复制发行而给社会带来混乱。

我认为订立编算农历国家标准是好事,但对其中的一秒计算精度要求感到困惑。编算历法根本不需要把朔和节气时间算到一秒,除非朔和节气时间离午夜零时小于一秒,但这样的情况绝少出现。要达到一秒精度要求,必须把太阳和月球的位置计算得很准确。太阳的平黄经在一回归年增加360°,所以在一秒钟的时间,太阳的视黄经平均来说增加360°/(365.2422×86400)=0.04"(即0.04弧秒)。所以要把二十四节气的时刻算准到一秒,必须把太阳的视黄经算准到0.04"。同理,要把合朔时刻算准到一秒,月球的视黄经必须计算准到360°/(29.5306×86400)=0.5"。世界上预先编算的太阳和月球位置历表,或许要到1970年代末才达到这样的精度。另外,必须严格定义「视黄经」来配合这个精度要求,所以《国标》明确规定必须按国际地球自转和参考系服务规范(IERS Conventions)定义的天球座标来计算太阳和月球的视黄经。

如前述,高精度的合朔和节气时刻只有在少数情况下,当这些时刻接近午夜零时时才有必要。但是这些情况要在数十年后才会出现,而且现在对这些情况暂时无能为力,原因是现在不能把数十年后的合朔和节气的UTC+8时刻很准确地算出。现代的准确历表大多以质心力学时(barycentric dynamical time)TDB为时间标准。TDB是用广义相对论来定义的均匀时间,用来计算月球和太阳系行星的位置。编算农历要用UTC+8时间,所以必须把TDB转化为UTC+8。这可先把TDB转化为地球时(terrestrial time)TT,然后再把TT转化为UTC+8。TDB与TT的转换可用广义相对论的变换公式计算,但是TDB与TT在数千年来的差异不大于二毫秒(即0.002秒),所以在编算历法时可省略这一步,即把TDB与TT视为等同。而TT与国际原子时TAI有简单的关系: TT=TAI+32.184秒,上面说过TAI和UTC相差整数秒,确实的秒差涉及到究竟有多少闰秒加到UTC上。所以要把TDB化为UTC+8,就要知道闰秒的数目,但是地球自转不均匀,数十年后的闰秒数目难以准确预测。所以虽然现代的高精度历表能把数十年后的合朔和节气的TDB时刻计算得很准,但是其对应的UTC+8时刻还是不能准确算出。因此我们对数十年后接近午夜零时的合朔和二十四节气日期暂时无能为力。面对这些少数的合朔和节气,我认为最佳的处理方法是承认现在无法断定这些合朔和节气的日期,确实日期与现在推算的日期或会有一日之差。本网站就是用这样的方法处理这些少数的合朔和节气。

合朔和节气时刻接近午夜零时的情况以前当然也曾发生,以前对合朔和节气的定义没有现在那么精确,计算方法也没有现在那么准,而且在1929年以前的时刻也不用东经120°的标准时。所以用现在的方法计算以前的合朔和节气日期有时与当时的计算结果不一致,而算出的农历也可能与以前通行的日历不一致。遇到这些情况时,应以当时政府颁行的日历为准。本网站所列的月相和节气时刻都是根据现代方法计算,但是历代的农历日期依照当时政府颁行的历法。至于二十四节气的日期,年历网页中在公元1733年以前列出以当时历法计算的日期,称为「历书节气」,1733年以后的历书节气根本上与现代计算的一致,所以略去不注,只有遇到与当时的历书有不一致时才会用红色字形注明。



备 注 和 参 考 文 献



\ No newline at end of file +农 历 编 算 法 则

农 历 编 算 法 则

初稿: 2018年10月     最近一次重大修订: 2019年4月


中国自公元1912年(民国元年)起采用公历(即格里高里历),但是传统的农历仍在民间使用,而且大多数传统节日及公众假期仍依照农历,所以有必要对农历有基本认识。本网页旨在简单介绍农历的编算法则。坊间有不少谈论历法的通俗书籍可供有兴趣的读者参阅,例如唐汉良先生的《历书百问百答》唐汉良


内容

  1. 引 言
  2. 重 要 概 念
    1. UT1, UTC, 中 国 标 准 时
    2. 农 历 的 纪 年、纪 月 和 纪 日 法
    3. 中 气 和 岁
  3. 现 代 农 历 的 编 算 法 则
  4. 农 历 编 算 例 子
    1. 例 一: 推 算 N2017 (丁 酉 年) 的 所 有 农 历 月
    2. 例 二: 推 算 N2033 (癸 丑 年) 的 所 有 农 历 月
    3. 异 常 的 年 份 N2033 (癸 丑 年)
  5. 农 历 法 则 之 疑 惑
    1. 兼 顾 阴 阳 两 周
    2. 十 九 年 七 闰 法 之 谜
    3. 农 历 年 月 的 平 均 日 数
  6. 《农 历 的 编 算 和 颁 行》: 2017 年 国 家 标 准 (GB/T 33661-2017)

    备注和参考文献


引 言

历法是为了纪录时间而制。在古代,有三个周期对人们日常生活很重要:昼夜交替的周期、月亮盈亏的周期和季节交替的周期。昼夜交替的平均时间是平太阳日。月亮盈亏的周期是朔望月,其平均值是29.5306日。季节交替的周期是回归年(古代称「岁实」),可由两冬至或两春分的平均时间以定,其值为365.2422日注一。「日」的概念缘自昼夜交替,「月」的概念缘自月亮盈亏,「年」或「岁」的概念缘自季节交替。

历法要解决的其中一个重要问题是怎样编排年月日。上述三个周期彼此之间的比例都不能约化成简单分数,这使编制历法颇为困难。其中一个办法是不理会朔望月,只考虑回归年,年和月按特定规律编排,使一年的平均周期近似回归年,这样的历法称为「太阳历」,简称「阳历」,公历就是一种阳历。另一个办法是不理会回归年,年和月按特定的规律编排,使一个月的平均周期接近朔望月,这样的历法称为「太阴历」,简称「阴历」,伊斯兰历就是一种阴历。第三个办法是要同时兼顾朔望月和回归年,年和月按特定的规律编排,使一个月的平均周期接近朔望月,一年的平均周期接近回归年,这样的历法称为「阴阳合历」,简称「阴阳历」,农历就是一种阴阳历。

农历规定把朔(即新月)落在的那一日定为某月初一。朔望月的平均值是29.5306日,所以农历一个月可以有二十九日,称为小月,也可以有三十日,称为大月。月大月小是根据两朔日之间的日数而定。回归年的周期是365.2422日,是朔望月平均值的12.37倍,所以农历一年一般有十二个月。为使农历不偏离回归年的周期,约每三年需有一个「闰月」,即一年有十三个月。

安置闰月以使农历一年平均周期接近回归年,即「置闰法则」,是农历要解决的重要问题。历代用过很多不同的置闰法则,有过五次重大的历法改革,最近一次重大改革发生在清顺治二年(公元1645年)。这里只谈现在通用农历的法则,谈法则之前须先阐释对编算农历来说重要的天文和历法概念。


重 要 概 念

要深入了解现代农历的编算,得从现代的时间计量说起。


UT1, UTC, 中 国 标 准 时

世界时(UT)是根据地球自转制定的时间。世界时有几种不同版本,最常用的是UT1和协调世界时(UTC)。UT1是先根据地球上某一特定的经线注二相对于遥远恒星的方位,再通过简单变换得出符合平均太阳时的时间标准。地球自转不均匀,所以UT1的时间也不均匀,这使UT1在应用上有所不便,于是人们创立协调世界时UTC来取代UT1。

协调世界时UTC是由国际原子时TAI及UT1而定。国际原子时是根据遍布世界上超过五十个国家、超过四百台原子钟的时刻经过数据处理而定的时刻,由TAI所定的每一秒钟都是均匀的。UTC则定为TAI加上整数秒,使之与UT1的偏差不超过0.9秒。所以UTC的一秒和TAI的一秒时间间隔完全一样,当UTC与UT1的时刻相差快要超过0.9秒时,闰秒便会加到UTC上,闰秒可正可负,正闰秒的一分钟有六十一秒,负闰秒的一分钟只有五十九秒。到目前(2024年1月)为止的闰秒全是正闰秒。闰秒法则从1972年实施,到目前为止总共加了二十七个闰秒,上一次闰秒是在2016年12月31日23时59分60秒UTC。所以UTC在大多数的时候是均匀的,只是在加闰秒时会有一秒的突变,这些突变有时会造成混乱,所以有人自2005年起建议取消闰秒

区时定为与协调世界时UTC相差某个特定的时间,是世界各国采用的时间系统。现在中国各地采用的时间是东八区的区时,与UTC数字上相差八小时(例如东八区9:00相当于 UTC 1:00 ),一般以UTC+8表示,也称为北京时间或中国标准时。现在的农历就是以UTC+8为时间基础。


农 历 的 纪 年、纪 月 和 纪 日 法

农历现在以干支纪年。月份以正月、二月、三月……十二月表示,闰月取前一个月的月数在前面加上「闰」字,如闰三月、闰九月等。农历每月第一日到第十日依次纪为初一、初二……初十,第十一日到第二十日依次纪为十一、十二……二十,第二十一日到第二十九日依次纪为二十一、二十二……二十九,或者简纪为廿一、廿二……廿九,第三十日纪为三十。农历也可用干支来纪日期,但月份一般不用干支。

众所周知,以前中国常以帝王年号纪年,这种纪年方法到清朝灭亡后废除。中华民国虽然用「民国」纪年,但民国纪的是公历年而非农历年,例如民国元年是指公元1912年,不是农历壬子年。


朔是指月亮与太阳在同一方向的时刻,这说法过于笼统,现代天文学把朔定义为月球地心视黄经λM与太阳地心视黄经λS相等的时刻。与朔相关的概念有上弦、望和下弦。上弦是λM-λS=90°的时刻;望是λM-λS=180°的时刻;下弦是λM-λS=270°的时刻。笼统地说,上弦是月亮位於太阳以东90°的时候;望是月亮在太阳的相反方向的时候;下弦是月亮位於太阳以西90°的时候。

朔所在的日期称为朔日。中国一直以来以午夜零时(古时称子正)作为一天的开始,所以不论朔发生在某天的00:00:00或23:59:59.999,朔日仍视为同一天。值得注意的是现在农历以UTC+8为时间基础,例如朔曾发生在公元2010年12月5日UTC17:36,换成UTC+8区时,这次朔发生在2010年12月6日的01:36,所以这次朔日是在2010年12月6日。

农历有一条古老法则一直沿用至今:朔日定为某月的初一日。所以2010年12月6日必是某月的初一日,下面要说的另一法则把此朔日定为十一月初一。下一个朔日发生在公元2011年1月4日,所以下一个月的初一是2011年1月4日。2010年12月6日和2011年1月4日之间有二十九日,由此推出这个十一月是小月。


中 气 和 岁

二十四节气网页所述,中国古代用二十四节气来表示太阳在黄道的位置。二十四节气又分为十二个中气和十二个节气:自立春算起,单数的称为节气,双数的称为中气。现代天文把中气定义为太阳的地心视黄经达到30°的整数倍的时刻。

冬至是其中一个中气,在农历编算中相当重要。如六十干支网页所述,冬至所在的月份定为建子。自汉武帝太初元年(即公元前104年)以来的历代各朝一般以建寅为正月,所以建子是十一月,由此可知含冬至的月份必定是农历十一月。例如2010年的冬至时刻是12月22日07:38(UTC+8),上面提到2010年12月6日和2011年1月4日皆是朔日,故此以2010年12月6日为初一的月份含有冬至,所以是该月是十一月。

二十四节气网页又指出「岁」与「年」在农历是严格分开的。一岁是指从冬至到下一个冬至的时间。「岁」又可以指从建子月的初一日到下一个建子月之前的一日,即由十一月初一到下一个十一月初一前一日那段时间。一岁有十二或十三个月。为方便起见,这里称含十二个月的岁为「平岁」,称含十三个月的岁为「闰岁」。农历有一条重要法则:在闰岁的十三个月中,其中的一个月要定为闰月。

平岁的月份编排很简单。如前所述,含冬至的那个月定为十一月,以后的十一个月依次定为十二月、正月、二月……十月。所以在平岁中正月是十一月(建子)后的第二个月,正月初一是冬至日后的第二个朔日。

闰岁的情况稍为复杂。一岁有十二个中气,闰岁有十三个月,所以至少有一个月不含中气,农历规定冬至后第一个不含中气的月份定为闰月。为方便起见,这里且称非闰月的月份为「平月」。在闰岁中含冬至的月份定为十一月,其余十一个平月依次定为十二月、正月、二月……十月,闰月取前一个月的月数在前面加上「闰」字。在闰岁中正月是十一月以后的第二个平月。


现 代 农 历 的 编 算 法 则

重要概念都说完了,现在要总结现代农历的编算法则。下面列出的法则是根据中华人民共和国国家质量监督检验检疫总局和中国国家标准化管理委员会联合发布的《农历的编算和颁行》文件国标(编号GB/T 33661-2017),这文件是2017年5月由中国科学院紫金山天文台拟定。以下用《国标》简称这文件。

除了法则一和法则五外,其他法则基本上是继承古制。法则四和法则六其实就是「含冬至之月为建子,以建寅为正月」的另一写法,这写法取自《国标》,显然是为了避谈月建,却不免使不熟识中国历法者感到有点莫名其妙。法则五是顺治二年(1645年)历法改革时制定的,稍为修改了之前的「无中气」置闰法则。法则一是1928年才加上的。

现在,法则一其实是说算农历时应用UTC+8作为标准时。但是UTC在1960年制定,经过多次修改,到1972年才定下来。为了避免混乱,本网站所列的时间在1972年以前是UT1+8,从1972年起才用UTC+8。这其实几乎没有什么关系,本网站列出的时间只列到分钟,UT1和UTC在1960年和1971年间最多只有几秒之差。

法则一到1929年起才实施,1929年前的时间以北京地方时为准,北京的经度是116°25',与东经120°标准时相差约十四分钟。如果朔或节气时刻接近午夜零时,十四分钟之差可以使朔日或节气之日有一日之差。例如有朔发生在公元1916年2月4日0:05(UT1+8),按北京地方时这朔发生在2月4日午夜前,所以朔日是2月3日,这朔日正好是农历丙辰年的正月初一,所以中国在1916年2月3日庆祝农历新年,而不是2月4日。

从上述法则可制定编算农历的方法,下面列出的方法可用来编定一岁内的所有农历月,即从某年十一月到下一年十月的所有农历月日。为方便起见,以下用NY表示年首最接近公历Y年1月1日的农历年,例如N1984指农历甲子年,始于公元1984年2月2日,终于1985年2月19日。用WY表示落在公历Y年的冬至日期,SY则表示从NY-1的建子月到NY建子月之前一日的那段时间,即农历的岁。

  1. 计算两冬至的日期WY-1WY

  2. 计算在WY-1或之前的第一个朔日M-1和在WY或之前的第一个朔日M11

  3. 求从M-1M11之间的朔的数目LY(包括M-1但不包括M11),LY是最接近(M11 - M-1)/29.53的整数。

    1. 如果LY=12,则SY是平岁。计算M-1之后的十一个朔日,依次标以M0,M1,……,M10

    2. 如果LY=13,则SY是闰岁。计算M-1之后的十二个朔日及在SY内的所有中气日期,然后找出最先出现不含中气的月份,这个月份便是闰月。把平月的朔日日期依次标以M0,M1,……,M10,闰月的朔日日期则标以M*i,这里i是闰月之前那个月的编号。

  4. M-1是农历年NY-1的十一月初一,M0是十二月初一,M1是农历年NY的正月初一,M2,……,M10是农历年NY的二月初一,……,十月初一。如果有闰月,闰月的初一是M*i

上述程序定出从农历年NY-1的十一月到农历年NY十月的月日编排,如想推算农历年NY的其余月份,就要重复以上步骤来计算下一个岁SY+1的农历月份。


农 历 编 算 例 子
农 历 法 则 之 疑 惑
《农 历 的 编 算 和 颁 行》: 2017 年 国 家 标 准 (GB/T 33661-2017)

上面说到2017年5月中国科学院紫金山天文台拟定了《农历的编算和颁行》文件国标(编号GB/T 33661-2017),由中华人民共和国国家质量监督检验检疫总局和中国国家标准化管理委员会联合发布。这《国标》文件的出现,应该和下面的历史有关。

多年来,《万年历》在民间很流行。据中国科学院紫金山天文台编的《新编万年历(修定本)》新编万年历和刘宝琳编的《100年袖珍干支月曆》刘宝琳所述,《万年历》是由清朝钦天监所编,正式书名是《御定万年书》。第一部《万年历》在乾隆年间编成,年限是从清太祖天命九年(公元1624年,清朝入关前的第一个甲子年)到「乾隆一百年」(公元1835年)。乾隆五十二年(公元1787年)又编了一部《万年历》,把年限延长至「乾隆二百年」(公元1935年)。乾隆以后,凡新皇帝即位都会重编《万年历》,把年限延长至新皇帝年号的第二百年。所以《万年历》在嘉庆四年(公元1799年)、道光四年(公元1824年)、咸丰元年(公元1851年)、同治元年(公元1862年)、光绪二年(公元1876年)都有续修。最后一部《万年历》在宣统二年(公元1910年)编成,年限延长至「宣统二百年」(公元2108年)。

《万年历》虽然预推二百年的日历,可是清政府每年颁行的历书《大清时宪书》不根据《万年历》,《大清时宪书》有时会修正《万年历》的预推。例如嘉庆《万年历》预推嘉庆四十六年(实际是道光二十一年)十一月大、十二月小,十二月初一的日干支是辛巳(公元1842年1月12日),而《大清道光二十一年时宪书》改为十一月小、十二月大,十二月初一的日干支是庚辰(公元1842年1月11日);道光《万年历》预推道光三十六年(实际是咸丰六年)十月小、十一月大,十一月初一的日干支是甲寅(公元1856年11月27日),而《大清咸丰六年时宪书》改为十月大、十一月小,十一月初一的日干支是乙卯(公元1856年11月28日);同治《万年历》预推同治二十九年(实际是光绪十六年)六月小、七月大,七月初一的日干支是戊辰(公元1890年8月15日),而《大清光绪十六年时宪书》改为六月大、七月小,七月初一的日干支是己巳(公元1890年8月16日)。这样的例子还有不少,说明《万年历》即使在清朝也不是正式采用。根据刘宝琳和Richard Stephenson的文章,[Liu-Stephenson98]《万年历》与《大清时宪书》的历日差异是因为《万年历》显然用了简略算法计算日历,当合朔时刻接近夜半零时,用简略算法算出的朔日或会落在错误的日期。

公元1912年中华民国成立,宣布改用公历,但是农历仍在民间流行。于是中国有两个新年,民间对公历新年反应冷淡,到了农历新年却非常热闹,当时有「民国的新年」和「国民的新年」说法。北洋政府颁行的《中华民国历书》除了登载公历外,仍然登载农历。到了1929年,南京国民政府试图禁止农历在民间使用,国民政府颁行的《国民历》不再登载农历。但是人民已习惯了使用农历,而且传统习俗和节日都依据农历,所以禁令难以实行。1934年,国民政府无奈表示「对于旧历年关,除公务机关,民间习俗不宜过于干涉」,停止了强制废除农历。

由于政府不再颁行「官方农历」,在民间流行的农历有时会出现不同版本。1953年,中国大陆出现了两种不同的日历,一种根据宣统《万年历》载农历六月小、七月大(七月初一在8月9日),另一种根据紫金山天文台的资料载农历六月大、七月小(七月初一在8月10日)。自此以后,内地出版的日历大都根据紫金山天文台的资料,而不再用《万年历》了。到了1978年在香港和广州等地出现了两种版本的农历。根据紫金山天文台编的农历该年的八月初一在公历9月3日(合朔时刻是00:09(UTC+8)),而香港和从香港运到广州等地的一些日历根据宣统《万年历》载八月初一在公历9月2日,导致两种版本的中秋节日期有一日差异。这朔日差异主要是由于宣统《万年历》计算的时间是根据北京的地方视时,推算的合朔时刻在9月3日零时之前数分钟。从此以后,香港和内地都采用紫金山天文台编的农历。在1989年又出现了宣统《万年历》与紫金山天文台对农历七月初一的日期差异,此时香港与内地一致采用紫金山天文台的资料,但在台湾却不然。经台湾权威机构证实紫金山天文台的数据正确后,台湾出版的大量错误日历遭收回。

《国标》的订立,就是为了杜绝这些不同版本的农历带来的混乱。《国标》文件列出的农历编算法则与顺治二年(1645年)历法改革所定的法则基本上一致,《国标》主要是用现代天文学严格定义历算中涉及的天文学概念,比较专门的概念不便在文件中详细说明,所以说要依照国际地球自转和参考系服务规范(IERS Conventions)发布的文件来诠释那些专门概念。文件也规定朔和二十四节气时刻计算精度应达到一秒(不计及编算时尚未正式公布的闰秒),1912年至《国标》生效之日期(2017年9月1日)间的农历日历应参考紫金山天文台编算的农历。中国科学院会提前一年正式发布农历日历的年度标准资料,所以农历又有了「官方版」。《国标》主要目的是以现代天文学概念规范农历的编算方法,订立国家标准,杜绝错误的农历经辗转复制发行而给社会带来混乱。

我认为订立编算农历国家标准是好事,但对其中的一秒计算精度要求感到困惑。编算历法根本不需要把朔和节气时间算到一秒,除非朔和节气时间离午夜零时小于一秒,但这样的情况绝少出现。要达到一秒精度要求,必须把太阳和月球的位置计算得很准确。太阳的平黄经在一回归年增加360°,所以在一秒钟的时间,太阳的视黄经平均来说增加360°/(365.2422×86400)=0.04"(即0.04弧秒)。所以要把二十四节气的时刻算准到一秒,必须把太阳的视黄经算准到0.04"。同理,要把合朔时刻算准到一秒,月球的视黄经必须计算准到360°/(29.5306×86400)=0.5"。世界上预先编算的太阳和月球位置历表,或许要到1970年代末才达到这样的精度。另外,必须严格定义「视黄经」来配合这个精度要求,所以《国标》明确规定必须按国际地球自转和参考系服务规范(IERS Conventions)定义的天球座标来计算太阳和月球的视黄经。

如前述,高精度的合朔和节气时刻只有在少数情况下,当这些时刻接近午夜零时时才有必要。但是这些情况要在数十年后才会出现,而且现在对这些情况暂时无能为力,原因是现在不能把数十年后的合朔和节气的UTC+8时刻很准确地算出。现代的准确历表大多以质心力学时(barycentric dynamical time)TDB为时间标准。TDB是用广义相对论来定义的均匀时间,用来计算月球和太阳系行星的位置。编算农历要用UTC+8时间,所以必须把TDB转化为UTC+8。这可先把TDB转化为地球时(terrestrial time)TT,然后再把TT转化为UTC+8。TDB与TT的转换可用广义相对论的变换公式计算,但是TDB与TT在数千年来的差异不大于二毫秒(即0.002秒),所以在编算历法时可省略这一步,即把TDB与TT视为等同。而TT与国际原子时TAI有简单的关系: TT=TAI+32.184秒,上面说过TAI和UTC相差整数秒,确实的秒差涉及到究竟有多少闰秒加到UTC上。所以要把TDB化为UTC+8,就要知道闰秒的数目,但是地球自转不均匀,数十年后的闰秒数目难以准确预测。所以虽然现代的高精度历表能把数十年后的合朔和节气的TDB时刻计算得很准,但是其对应的UTC+8时刻还是不能准确算出。因此我们对数十年后接近午夜零时的合朔和二十四节气日期暂时无能为力。面对这些少数的合朔和节气,我认为最佳的处理方法是承认现在无法断定这些合朔和节气的日期,确实日期与现在推算的日期或会有一日之差。本网站就是用这样的方法处理这些少数的合朔和节气。

合朔和节气时刻接近午夜零时的情况以前当然也曾发生,以前对合朔和节气的定义没有现在那么精确,计算方法也没有现在那么准,而且在1929年以前的时刻也不用东经120°的标准时。所以用现在的方法计算以前的合朔和节气日期有时与当时的计算结果不一致,而算出的农历也可能与以前通行的日历不一致。遇到这些情况时,应以当时政府颁行的日历为准。本网站所列的月相和节气时刻都是根据现代方法计算,但是历代的农历日期依照当时政府颁行的历法。至于二十四节气的日期,年历网页中在公元1733年以前列出以当时历法计算的日期,称为「历书节气」,1733年以后的历书节气根本上与现代计算的一致,所以略去不注,只有遇到与当时的历书有不一致时才会用红色字形注明。



备 注 和 参 考 文 献



\ No newline at end of file diff --git a/src/rules.html b/src/rules.html index 3fda050..e2db3ee 100755 --- a/src/rules.html +++ b/src/rules.html @@ -104,7 +104,7 @@

Rules for the Chinese Calendar

Universal Time (UT) is a time standard based on Earth's rotation with respect to the Sun. There are several versions of universal time. The most commonly used are UT1 and the Coordinated Universal Time (UTC). UT1 is based on the orientation of a reference meridian[fn2] on Earth's surface relative to distant stars, and then use a simple transformation to obtain a time standard in accord with the mean solar time. The problem is that Earth's rotation is not uniform, which makes UT1 inconvenient for many applications. As a result, the Coordinated Universal Time (UTC) is introduced to approximate UT1.

-

UTC is defined by two components: International Atomic Time (TAI) and UT1. TAI is a weighted average of the time kept by over 400 atomic clocks in over 50 national laboratories worldwide. Each second of in a TAI is a constant. UTC is defined to be TAI plus an integer number of seconds. The duration of one second in UTC is therefore exactly equal to one TAI second. Leap seconds are added to ensure that the difference between UTC and UT1 is smaller than 0.9 seconds. Leap seconds are usually inserted to the last minute on June 30 at 23:59:59 UTC or on December 31 at 23:59:59 UTC of a year. In principle, a leap second can be positive or negative. The minute with a positive leap second has 61 seconds and the minute with a negative leap second has only 59 seconds. So far only positive leap seconds appear. As of today (October 2018), a total of 27 leap seconds have been inserted since the system of adjustment was implemented in 1972. The most recent leap second occurred on December 31, 2016 at 23:59:60 UTC. Thus, time in UTC is uniform, except for occasional "glitches" when leap seconds are added. These "glitches" cause some problems and there have been discussions on the abolishment of leap seconds since 2005.

+

UTC is defined by two components: International Atomic Time (TAI) and UT1. TAI is a weighted average of the time kept by over 400 atomic clocks in over 50 national laboratories worldwide. Each second of in a TAI is a constant. UTC is defined to be TAI plus an integer number of seconds. The duration of one second in UTC is therefore exactly equal to one TAI second. Leap seconds are added to ensure that the difference between UTC and UT1 is smaller than 0.9 seconds. Leap seconds are usually inserted to the last minute on June 30 at 23:59:59 UTC or on December 31 at 23:59:59 UTC of a year. In principle, a leap second can be positive or negative. The minute with a positive leap second has 61 seconds and the minute with a negative leap second has only 59 seconds. So far only positive leap seconds appear. As of today (January 2024), a total of 27 leap seconds have been inserted since the system of adjustment was implemented in 1972. The most recent leap second occurred on December 31, 2016 at 23:59:60 UTC. Thus, time in UTC is uniform, except for occasional "glitches" when leap seconds are added. These "glitches" cause some problems and there have been discussions on the abolishment of leap seconds since 2005.

Civil time is related to UTC by a UTC offset. A UTC offset is a multiple of 15 minutes, and the majority of offsets are in whole hours. As far as the Chinese calendar is concerned, the most important civil time is the China standard time, which is UTC+08:00, meaning that it is 8 hours ahead of UTC. This is the local time for the meridians of 120° East.


diff --git a/src/rules_chinese.html b/src/rules_chinese.html index 721da5b..096b217 100755 --- a/src/rules_chinese.html +++ b/src/rules_chinese.html @@ -77,7 +77,7 @@

農 曆 編 算 法 則

曆法是為了紀錄時間而制。在古代,有三個週期對人們日常生活很重要:晝夜交替的週期、月亮盈虧的週期和季節交替的週期。晝夜交替的平均時間是平太陽日。月亮盈虧的週期是朔望月,其平均值是29.5306日。季節交替的週期是回歸年(古代稱「歲實」),可由兩冬至或兩春分的平均時間以定,其值為365.2422日註一。「日」的概念緣自晝夜交替,「月」的概念緣自月亮盈虧,「年」或「歲」的概念緣自季節交替。

-

曆法要解決的其中一個重要問題是怎樣編排年月日。上述三個週期彼此之間的比例都不能約化成簡單分數,這使編制曆法頗為困難。其中一個辦法是不理會朔望月,只考慮回歸年,年和月按特定規律編排,使一年的平均週期近似回歸年,這樣的曆法稱為「太陽曆」,簡稱「陽曆」,公曆就是一種陽曆。另一個辦法是不理會回歸年,年和月按特定的規律編排,使一個月的平均週期接近朔望月,這樣的曆法稱為「太陰曆」,簡稱「陰曆」,伊斯蘭曆就是一種陰曆。第三個辦法是要同時兼顧朔望月和回歸年,年和月按特定的規律編排,使一個月的平均週期接近朔望月,一年的平均週期接近回歸年,這樣的曆法稱為「陰陽合曆」,簡稱「陰陽曆」,農曆就是一種陰陽曆。

+

曆法要解決的其中一個重要問題是怎樣編排年月日。上述三個週期彼此之間的比例都不能約化成簡單分數,這使編制曆法頗為困難。其中一個辦法是不理會朔望月,只考慮回歸年,年和月按特定規律編排,使一年的平均週期近似回歸年,這樣的曆法稱為「太陽曆」,簡稱「陽曆」,公曆(格里高里曆)就是一種陽曆。另一個辦法是不理會回歸年,年和月按特定的規律編排,使一個月的平均週期接近朔望月,這樣的曆法稱為「太陰曆」,簡稱「陰曆」,伊斯蘭曆就是一種陰曆。第三個辦法是要同時兼顧朔望月和回歸年,年和月按特定的規律編排,使一個月的平均週期接近朔望月,一年的平均週期接近回歸年,這樣的曆法稱為「陰陽合曆」,簡稱「陰陽曆」,農曆就是一種陰陽曆。

農曆規定把朔(即新月)落在的那一日定為某月初一。朔望月的平均值是29.5306日,所以農曆一個月可以有二十九日,稱為小月,也可以有三十日,稱為大月。月大月小是根據兩朔日之間的日數而定。回歸年的週期是365.2422日,是朔望月平均值的12.37倍,所以農曆一年一般有十二個月。為使農曆不偏離回歸年的週期,約每三年需有一個「閏月」,即一年有十三個月。

@@ -93,7 +93,7 @@

農 曆 編 算 法 則

世界時(UT)是根據地球自轉制定的時間。世界時有幾種不同版本,最常用的是UT1和協調世界時(UTC)。UT1是先根據地球上某一特定的經線註二相對於遙遠恆星的方位,再通過簡單變換得出符合平均太陽時的時間標準。地球自轉不均勻,所以UT1的時間也不均勻,這使UT1在應用上有所不便,於是人們創立協調世界時UTC來取代UT1。

-

協調世界時UTC是由國際原子時TAI及UT1而定。國際原子時是根據遍布世界上超過五十個國家、超過四百臺原子鐘的時刻經過數據處理而定的時刻,由TAI所定的每一秒鐘都是均勻的。UTC則定為TAI加上整數秒,使之與UT1的偏差不超過0.9秒。所以UTC的一秒和TAI的一秒時間間隔完全一樣,當UTC與UT1的時刻相差快要超過0.9秒時,閏秒便會加到UTC上,閏秒可正可負,正閏秒的一分鐘有六十一秒,負閏秒的一分鐘只有五十九秒。到目前(2022年10月)為止的閏秒全是正閏秒。閏秒法則從1972年實施,到目前(2018年10月)為止總共加了二十七個閏秒,上一次閏秒是在2016年12月31日23時59分60秒UTC。所以UTC在大多數的時候是均勻的,只是在加閏秒時會有一秒的突變,這些突變有時會造成混亂,所以有人自2005年起建議取消閏秒

+

協調世界時UTC是由國際原子時TAI及UT1而定。國際原子時是根據遍布世界上超過五十個國家、超過四百臺原子鐘的時刻經過數據處理而定的時刻,由TAI所定的每一秒鐘都是均勻的。UTC則定為TAI加上整數秒,使之與UT1的偏差不超過0.9秒。所以UTC的一秒和TAI的一秒時間間隔完全一樣,當UTC與UT1的時刻相差快要超過0.9秒時,閏秒便會加到UTC上,閏秒可正可負,正閏秒的一分鐘有六十一秒,負閏秒的一分鐘只有五十九秒。到目前(2024年1月)為止的閏秒全是正閏秒。閏秒法則從1972年實施,到目前為止總共加了二十七個閏秒,上一次閏秒是在2016年12月31日23時59分60秒UTC。所以UTC在大多數的時候是均勻的,只是在加閏秒時會有一秒的突變,這些突變有時會造成混亂,所以有人自2005年起建議取消閏秒

區時定為與協調世界時UTC相差某個特定的時間,是世界各國採用的時間系統。現在中國各地採用的時間是東八區的區時,與UTC數字上相差八小時(例如東八區9:00相當於 UTC 1:00 ),一般以UTC+8表示,也稱為北京時間或中國標準時。現在的農曆就是以UTC+8為時間基礎。

diff --git a/src/rules_simp.html b/src/rules_simp.html index bed6c79..608ab2d 100755 --- a/src/rules_simp.html +++ b/src/rules_simp.html @@ -93,7 +93,7 @@

农 历 编 算 法 则

世界时(UT)是根据地球自转制定的时间。世界时有几种不同版本,最常用的是UT1和协调世界时(UTC)。UT1是先根据地球上某一特定的经线注二相对于遥远恒星的方位,再通过简单变换得出符合平均太阳时的时间标准。地球自转不均匀,所以UT1的时间也不均匀,这使UT1在应用上有所不便,于是人们创立协调世界时UTC来取代UT1。

-

协调世界时UTC是由国际原子时TAI及UT1而定。国际原子时是根据遍布世界上超过五十个国家、超过四百台原子钟的时刻经过数据处理而定的时刻,由TAI所定的每一秒钟都是均匀的。UTC则定为TAI加上整数秒,使之与UT1的偏差不超过0.9秒。所以UTC的一秒和TAI的一秒时间间隔完全一样,当UTC与UT1的时刻相差快要超过0.9秒时,闰秒便会加到UTC上,闰秒可正可负,正闰秒的一分钟有六十一秒,负闰秒的一分钟只有五十九秒。到目前(2018年10月)为止的闰秒全是正闰秒。闰秒法则从1972年实施,到目前(2018年10月)为止总共加了二十七个闰秒,上一次闰秒是在2016年12月31日23时59分60秒UTC。所以UTC在大多数的时候是均匀的,只是在加闰秒时会有一秒的突变,这些突变有时会造成混乱,所以有人自2005年起建议取消闰秒

+

协调世界时UTC是由国际原子时TAI及UT1而定。国际原子时是根据遍布世界上超过五十个国家、超过四百台原子钟的时刻经过数据处理而定的时刻,由TAI所定的每一秒钟都是均匀的。UTC则定为TAI加上整数秒,使之与UT1的偏差不超过0.9秒。所以UTC的一秒和TAI的一秒时间间隔完全一样,当UTC与UT1的时刻相差快要超过0.9秒时,闰秒便会加到UTC上,闰秒可正可负,正闰秒的一分钟有六十一秒,负闰秒的一分钟只有五十九秒。到目前(2024年1月)为止的闰秒全是正闰秒。闰秒法则从1972年实施,到目前为止总共加了二十七个闰秒,上一次闰秒是在2016年12月31日23时59分60秒UTC。所以UTC在大多数的时候是均匀的,只是在加闰秒时会有一秒的突变,这些突变有时会造成混乱,所以有人自2005年起建议取消闰秒

区时定为与协调世界时UTC相差某个特定的时间,是世界各国采用的时间系统。现在中国各地采用的时间是东八区的区时,与UTC数字上相差八小时(例如东八区9:00相当于 UTC 1:00 ),一般以UTC+8表示,也称为北京时间或中国标准时。现在的农历就是以UTC+8为时间基础。

diff --git a/src/sunMoonData.js b/src/sunMoonData.js old mode 100644 new mode 100755