Research note

When the new moon falls near midnight

ICU’s Chinese calendar against the Hong Kong Observatory, 1901–2100

Summary

The Chinese calendar built into JavaScript — Intl.DateTimeFormat with calendar: 'chinese', answered by the ICU library — disagrees with the Hong Kong Observatory’s published tables on 447 of 72,674 days between 19 February 1901 and 8 February 2100, in twelve separate months. It is right on 99.4% of days, and wrong in clusters.

Eleven of those months are ICU’s own astronomy putting a new moon or a principal solar term on the wrong side of midnight. ICU times new moons with a median error of 4.5 minutes (at most 21.9) and principal terms with a median error of 23.7 minutes (at most 104.2), and the calendar has no tolerance at all: an event one second either side of midnight moves a month by a day. Three of the eleven move a leap month, relabelling 59 days at a time.

The remaining month is one where modern astronomy sides with ICU against the Observatory — in 2057, one of three months this century that the Observatory itself flags as uncertain, and which nobody can yet date, because the answer depends on how fast the Earth will be turning. On the rotation measured to date, the Observatory’s 2057 date is the less likely of the two.

1 The rule that makes midnight matter

The Chinese calendar has been computed from the true positions of the sun and moon since the reform of 1645. Its rules, now set out in the national standard GB/T 33661-2017, reduce to four:

  1. A day runs from midnight to midnight at the meridian 120° East — China Standard Time. (Before 1929, at the meridian of Beijing; see §5.)
  2. The day on which a new moon occurs is the first day of a month, whatever the hour.
  3. The month containing the winter solstice, 冬至 (Dongzhi, Winter Solstice), is the eleventh month.
  4. When thirteen new moons separate one eleventh month from the next, the first month between them that contains no principal solar term — no moment at which the sun’s longitude is a multiple of 30° — is a leap month, and repeats the number of the month before it.

Rules 2 and 4 are where the trouble lives. Neither rounds anything. A new moon at 23:59:59 starts its month a whole day before a new moon at 00:00:01, and a principal term a second after midnight on the day a month begins belongs to that month, not the one before. Every boundary in the calendar is a question of which side of a midnight an instant falls on. Any two implementations that time those instants differently will agree almost everywhere and disagree completely where it counts.

2 Three calendars, compared day by day

The comparison runs over every day from 19 February 1901 to 8 February 2100 — 72,674 days, the full span the Hong Kong Observatory tabulates — and reads three calendars for each:

The Observatory
The Hong Kong Observatory’s Gregorian–Lunar Calendar Conversion Tables, ingested in full and used as the reference throughout. Its tables are the calendar this site publishes.
ICU
ICU 78.3 as shipped in Node.js v24.19.0, read through Intl.DateTimeFormat. This is the calendar a JavaScript program gets when it asks for one.
A rebuild from modern astronomy
The calendar recomputed from the four rules above, with new moons and principal terms from astronomy-engine 2.1.19. Its new-moon times for every contested month were checked against NASA’s catalogue of lunar phases by Espenak and Meeus and agree to within 66 seconds; NASA publishes to the minute, so that is the resolution of the check.

ICU exposes only dates, not the instants it computed them from. To measure its astronomy directly, this note ports ICU’s CalendarAstronomer — the sun, the moon, and the search that finds when each reaches a given angle — line by line from the ICU release-78.3 source. The port reproduces ICU’s first day of the month for 2,474 of 2,474 new moons in the span, which is every one of them, so the instants it reports are the instants ICU used.

3 Where ICU and the Observatory part

Table 1. Every month in which ICU 78.3 and the Hong Kong Observatory give a different Chinese date, 1901–2100, with the event that decides it. Times are wall-clock at the meridian the Observatory used that year.
Days affected Hong Kong Observatory ICU Deciding event
23 March 1917 – 20 May 1917
59 days
23 March 1917 is the 1st day of leap month 2, lunar year 1917 23 March 1917 is the 1st day of month 3, lunar year 1917

Principal term 谷雨 (Guyu, Corn Rain; sun at 30°) at 00:03:08 Beijing local time (116°25′E) on 21 April 1917, 3 min 8 s after midnight. ICU times it 20 min 31 s earlier, on 20 April 1917.

25 June 1922 – 22 August 1922
59 days
25 June 1922 is the 1st day of leap month 5, lunar year 1922 25 June 1922 is the 1st day of month 6, lunar year 1922

Principal term 大暑 (Dashu, Great Heat; sun at 120°) at 00:05:15 Beijing local time (116°25′E) on 24 July 1922, 5 min 15 s after midnight. ICU times it 1 h 10 min 31 s earlier, on 23 July 1922.

3 February 1954 – 4 March 1954
30 days
3 February 1954 is the 1st day of month 1, lunar year 1954 3 February 1954 is the 30th day of month 12, lunar year 1953

New moon at 23:55:59 China Standard Time (120°E) on 3 February 1954, 4 min 1 s before midnight. ICU times it 4 min 19 s later, on 4 February 1954.

22 February 1955 – 23 March 1955
30 days
22 February 1955 is the 1st day of month 2, lunar year 1955 22 February 1955 is the 30th day of month 1, lunar year 1955

New moon at 23:54:54 China Standard Time (120°E) on 22 February 1955, 5 min 6 s before midnight. ICU times it 8 min 53 s later, on 23 February 1955.

26 July 1987 – 22 September 1987
59 days
26 July 1987 is the 1st day of leap month 6, lunar year 1987 26 July 1987 is the 1st day of month 7, lunar year 1987

Principal term 处暑 (Chushu, End of Heat; sun at 150°) at 00:09:56 China Standard Time (120°E) on 24 August 1987, 9 min 56 s after midnight. ICU times it 10 min 2 s earlier, on 23 August 1987.

17 January 1999 – 15 February 1999
30 days
17 January 1999 is the 1st day of month 12, lunar year 1998 17 January 1999 is the 30th day of month 11, lunar year 1998

New moon at 23:46:48 China Standard Time (120°E) on 17 January 1999, 13 min 12 s before midnight. ICU times it 14 min 38 s later, on 18 January 1999.

17 August 2012 – 15 September 2012
30 days
17 August 2012 is the 1st day of month 7, lunar year 2012 17 August 2012 is the 30th day of month 6, lunar year 2012

New moon at 23:55:06 China Standard Time (120°E) on 17 August 2012, 4 min 54 s before midnight. ICU times it 6 min 18 s later, on 18 August 2012.

7 November 2018 – 6 December 2018
30 days
7 November 2018 is the 30th day of month 9, lunar year 2018 7 November 2018 is the 1st day of month 10, lunar year 2018

New moon at 00:02:42 China Standard Time (120°E) on 8 November 2018, 2 min 42 s after midnight. ICU times it 8 min 21 s earlier, on 7 November 2018.

6 February 2027 – 7 March 2027
30 days
6 February 2027 is the 1st day of month 1, lunar year 2027 6 February 2027 is the 30th day of month 12, lunar year 2026

New moon at 23:56:47 China Standard Time (120°E) on 6 February 2027, 3 min 13 s before midnight. ICU times it 6 min 44 s later, on 7 February 2027.

2 February 2030 – 3 March 2030
30 days
2 February 2030 is the 30th day of month 12, lunar year 2029 2 February 2030 is the 1st day of month 1, lunar year 2030

New moon at 00:08:05 China Standard Time (120°E) on 3 February 2030, 8 min 5 s after midnight. ICU times it 10 min 58 s earlier, on 2 February 2030.

28 September 2057 – 27 October 2057
30 days
28 September 2057 is the 1st day of month 9, lunar year 2057 28 September 2057 is the 30th day of month 8, lunar year 2057 Modern astronomy agrees with ICU here; see §6.
12 March 2070 – 10 April 2070
30 days
12 March 2070 is the 1st day of month 2, lunar year 2070 12 March 2070 is the 30th day of month 1, lunar year 2070

New moon at 23:52:36 China Standard Time (120°E) on 12 March 2070, 7 min 24 s before midnight. ICU times it 13 min 54 s later, on 13 March 2070.

Eight of ICU’s eleven errors are a single month starting a day early or late: thirty days on which every date is off by one. Three are worse. When a principal term crosses midnight, the month that lacks one changes, and the leap month moves with it — two consecutive months are then misnumbered, 59 days in all.

Table 2. Traditional festivals that ICU places on a different Gregorian day from the Hong Kong Observatory, 1901–2100.
Festival Hong Kong Observatory ICU Difference
Lunar New Year, lunar year 1954 3 February 1954 4 February 1954 ICU 1 day late
Lantern Festival, lunar year 1954 17 February 1954 18 February 1954 ICU 1 day late
Qixi (Double Seventh Festival), lunar year 1987 30 August 1987 1 August 1987 ICU 29 days early
Ghost Festival, lunar year 1987 7 September 1987 9 August 1987 ICU 29 days early
Laba Festival, lunar year 1998 24 January 1999 25 January 1999 ICU 1 day late
Qixi (Double Seventh Festival), lunar year 2012 23 August 2012 24 August 2012 ICU 1 day late
Ghost Festival, lunar year 2012 31 August 2012 1 September 2012 ICU 1 day late
Lunar New Year, lunar year 2027 6 February 2027 7 February 2027 ICU 1 day late
Lantern Festival, lunar year 2027 20 February 2027 21 February 2027 ICU 1 day late
Lunar New Year, lunar year 2030 3 February 2030 2 February 2030 ICU 1 day early
Lantern Festival, lunar year 2030 17 February 2030 16 February 2030 ICU 1 day early
Double Ninth Festival, lunar year 2057 6 October 2057 7 October 2057 ICU 1 day late

Worked example: Lunar New Year 2027

The new moon that begins lunar year 2027 happens at 23:56:47 China Standard Time on 6 February 2027 — 3 min 13 s before midnight. By rule 2 the whole of that day is the first day of the year, and the Observatory says so. ICU computes the same new moon 6 min 44 s later, at 00:03:32 on 7 February 2027, and starts the year a day late.

For anyone born on 6 February 2027 the difference is not cosmetic. By the Observatory the child is born on the first day of 丁未 (Ding-Wei), the year of the Goat; by ICU, on the last day of 丙午 (Bing-Wu), the year of the Horse. Every zodiac lookup, 虚岁 (nominal age) count and lunar birthday built on Intl inherits ICU’s answer. The Lantern Festival that closes the New Year season moves with it, to 21 February 2027 instead of 20 February 2027.

Worked example: the leap month of 1987

In 1987 the principal term 处暑 (Chushu, End of Heat; sun at 150°) falls at 00:09:56 China Standard Time (120°E) on 24 August 1987 — 9 min 56 s after midnight, on the same day as that month’s new moon, so it belongs to the month that begins then. The month before it, beginning 26 July 1987, is left with no principal term and becomes the leap sixth month, 闰六月 (rùn liùyuè, “leap sixth month”).

ICU times the same term 10 min 2 s earlier: at 23:59:54 on 23 August 1987, 6 s before midnight. The month from 26 July 1987 now has a principal term; the first month without one is the next, and ICU makes that the leap month instead — a leap seventh month, 闰七月 (rùn qīyuè). From 26 July 1987 to 22 September 1987 the two calendars name different months. The Qixi festival, the seventh day of the seventh month, falls on 30 August 1987 by the Observatory and on 1 August 1987 by ICU — 29 days apart — and the Ghost Festival on 7 September 1987 against 9 August 1987.

A ten-minute error decided by a margin of seconds is not a coincidence peculiar to 1987. It is what the calendar’s zero tolerance does to any error at all: the only question is how often an event lands within the error of a midnight, and over two centuries the answer is eleven times.

4 Why ICU’s clock is off

ICU’s CalendarAstronomer says in its own documentation that it is modelled on Peter Duffett-Smith’s Practical Astronomy with your Calculator (Cambridge, 1990), and warns that it “basically does just enough” to support the Islamic and Chinese calendars. Three simplifications account for most of its error:

Table 3. ICU’s timing error for every new moon (2,474) and every principal term (2,400), 1901–2100, against astronomy-engine. Mean absolute error in minutes, by half-century.
Period New moons: mean error New moons: worst Principal terms: mean error Principal terms: worst
ICU error, 1901–1950 5.7 min 18.9 min 35.2 min 88 min
ICU error, 1951–2000 5 min 18.2 min 13.1 min 43.9 min
ICU error, 2001–2050 4.9 min 20.3 min 21.4 min 62.3 min
ICU error, 2051–2100 5.9 min 21.9 min 46.5 min 104.2 min
ICU error, whole span (median) 4.5 min 21.9 min 23.7 min 104.2 min
ICU’s mean timing error by year, 1901–2100 Two lines. Principal terms: error lowest around 1990 and rising towards both ends of the span, to about 56.9 minutes by 2100. New moons: roughly level at a few minutes throughout. 0 20 40 60 80 min 19011950200020502100 ICU’s orbital epoch, 1990 Principal terms New moons
Principal terms New moons
Figure 1. Mean absolute error of ICU’s timing, per Gregorian year, in minutes. Table 3 gives the same data by half-century.

The two errors matter differently. A new moon decides a single month boundary, and ICU’s new moons are good to a few minutes. A principal term decides where a leap month goes, and ICU’s principal terms are routinely out by half an hour or more, and run early by 9.4 minutes on average. The leap-month errors of Table 1 come from this second source.

None of this is a fault in ICU’s calendar rules, which are the standard ones applied correctly. The clearest evidence is 2033, the case that prompted Aslaksen’s paper. The month after the seventh contains no principal term but is not a leap month, because the thirteen new moons of rule 4 fall a year later; every Chinese calendar made it one until the early 1990s. ICU and the Observatory both give 闰十一月 (rùn shíyīyuè, “leap eleventh month”), and agree on every day of that year. The rules are right. The clock that feeds them is not.

5 The meridian before 1929

Rule 1 is younger than the others. China adopted a standard time based on 120° East in 1928, and calendars from 1929 on are computed for it. Before that they were computed for the meridian of Beijing, 116°25′ East — 14 min 20 s behind (Aslaksen 2003, rule 1). ICU’s source is explicit that it does not do this: “Some sources use a different historically accurate offset of GMT+7:45:40 for years before 1929; we do not do this.”

Rebuilding the calendar from modern astronomy three ways shows which meridian the Observatory’s tables use:

Table 4. Months in which a rebuild from modern astronomy disagrees with the Hong Kong Observatory, 1901–2100, depending on the meridian assumed.
Meridian assumed Months that disagree with the Observatory
120°E throughout5
116°25′E (Beijing) throughout21
Beijing before 1929, 120°E from 19293

The Observatory follows the historical meridian, and so should anyone converting a date from before 1929. That raises a question about ICU: if it ignores the Beijing meridian, why does it agree with the Observatory in the months where the meridian decides the day? There are three such months, and in each of them ICU is right by accident.

Table 5. New moons before 1929 where the meridian decides the day, and ICU agrees with the Hong Kong Observatory only because its own timing error cancels the difference.
New moon At 116°25′E (Beijing) At 120°E ICU’s timing error
New moon of 17 November 1914 12 min 5 s before midnight — the Observatory’s day 2 min 15 s after midnight — the next day 6 min 18 s earlier, back before midnight
New moon of 3 February 1916 8 min 29 s before midnight — the Observatory’s day 5 min 51 s after midnight — the next day 9 min 25 s earlier, back before midnight
New moon of 10 November 1920 8 min 54 s before midnight — the Observatory’s day 5 min 26 s after midnight — the next day 7 min 53 s earlier, back before midnight

One month before 1929 fits neither meridian. In 1906 the new moon falls 7 min 14 s before midnight at Beijing, so the rebuild begins the month on 23 April 1906; the Observatory begins it a day later. 1906 was still under the Qing dynasty’s 时宪历 (Shíxiàn lì, the Shixian calendar), computed with pre-modern astronomy that need not agree with a modern computation to within seven minutes. This note has not checked the printed almanac for that year, and leaves the month unexplained.

The meridian also reproduces a well-known confusion. Aslaksen records that in 1978 Hong Kong and Taiwan, still following the old imperial calendar, kept the Mid-Autumn Festival on a different day from mainland China. The new moon that began the eighth month fell at 00:09:34 on 3 September 1978 at 120°E, 9 min 34 s after midnight, but 4 min 46 s before midnight at Beijing. Computed at Beijing, the eighth month begins on 2 September 1978 and the festival falls on 16 September 1978; at 120°E on 3 September 1978 and 17 September 1978. The Observatory’s table today gives the 120°E answer.

6 Three months no one can date yet

The Observatory’s own page carries a warning: “The uncertainty in the calculation of the time of moon phases and solar terms decades ahead may be up to a few minutes.” It names three new moons whose month might start a day differently — 28 September 2057, 4 September 2089 and 7 August 2097. The uncertainty is not in the moon, whose motion is known far more precisely than that. It is in the Earth.

Orbits run on a uniform time-scale; clocks follow the Earth’s rotation, which is slowing irregularly. The gap between the two, ΔT, is measured for the past and must be forecast for the future. A new moon fixed in uniform time falls earlier by the clock if ΔT turns out larger, and later if it turns out smaller.

Table 6. The three new moons the Hong Kong Observatory flags as uncertain. Time from midnight uses astronomy-engine’s ΔT forecast (Espenak–Meeus); the threshold is the ΔT at which the new moon crosses midnight; σ is the forecast uncertainty from Huber’s model, as given by NASA.
New moon China Standard Time ΔT assumed → threshold First day of the month
New moon of 28 September 2057 (UTC) 00:00:40, 40 s after midnight 109 s → 149 s
σ ≈ 19.2 s; threshold 2.1σ above the forecast
Observatory: 28 September 2057
Modern astronomy: 29 September 2057
ICU: 29 September 2057
New moon of 4 September 2089 (UTC) 23:58:07, 1 min 53 s before midnight 179 s → 66 s
σ ≈ 39.8 s; threshold 2.8σ below the forecast
Observatory: 4 September 2089
Modern astronomy: 4 September 2089
ICU: 4 September 2089
New moon of 7 August 2097 (UTC) 00:00:15, 15 s after midnight 197 s → 212 s
σ ≈ 45.6 s; threshold 0.3σ above the forecast
Observatory: 7 August 2097
Modern astronomy: 8 August 2097
ICU: 7 August 2097

The Observatory’s choices can be reproduced exactly. Rebuilding the calendar from 2026 on with the long-term parabola for ΔT — the formula of Morrison and Stephenson, which NASA gives for dates far from the present — matches the Observatory on every day to 2100. Not one day differs. That shows the tables are consistent with a larger ΔT forecast; it does not show that the Observatory used that formula.

Which forecast will prove right is a question about the Earth, and the measurements so far point one way. The US Naval Observatory’s measured ΔT rose steadily for decades, then stopped:

Table 7. Measured ΔT on 1 January, US Naval Observatory. Read 29 September 2026.
YearΔT
ΔT on 1 January 197545.48 s
ΔT on 1 January 198050.54 s
ΔT on 1 January 198554.34 s
ΔT on 1 January 199056.86 s
ΔT on 1 January 199560.79 s
ΔT on 1 January 200063.83 s
ΔT on 1 January 200564.69 s
ΔT on 1 January 201066.07 s
ΔT on 1 January 201567.64 s
ΔT on 1 January 201668.10 s
ΔT on 1 January 201768.59 s
ΔT on 1 January 201868.97 s
ΔT on 1 January 201969.22 s
ΔT on 1 January 202069.36 s
ΔT on 1 January 202169.36 s
ΔT on 1 January 202269.29 s
ΔT on 1 January 202369.20 s
ΔT on 1 January 202469.18 s
ΔT on 1 January 202569.14 s
ΔT on 1 January 202669.11 s

ΔT peaked at 69.36 s in 2020 and has drifted down to 69.11 s since, as the Earth’s rotation has sped up slightly. For the Observatory’s date for 2057 to be right, ΔT must reach 149 s by then — an average gain of 2.6 s a year for three decades. Over the thirty years from 1975 to 2005 it gained 0.6 s a year. On the evidence to date, the ninth month of 2057 is more likely to begin on 29 September 2057, as modern astronomy and ICU have it, than on 28 September 2057 — which would move the Double Ninth Festival from 6 October 2057 to 7 October 2057.

2089 runs the other way. Every calendar here agrees on 4 September 2089, but only while ΔT stays above 66 s in 2089; today it is 69.1 s. The long-term trend of tidal braking makes a fall of that size unlikely, but it is the one flagged month where the agreed answer depends on the Earth not continuing to do what it is doing now. And 2097, whose new moon falls 15 s after midnight on a forecast uncertain by ±45.6 s, is simply open. ICU’s answer for it agrees with the Observatory, but only because ICU’s own error is larger than the margin.

7 What follows

For software, the practical reading is narrow. Intl’s Chinese calendar is right on 99.4% of days, and every one of its errors sits in a month whose deciding event lies within 14 minutes of a midnight. Anything published — a table of dates, a festival calendar, a birth year’s zodiac animal — should come from the published tables instead. This site takes its Chinese dates from the Observatory for that reason; its Lunar New Year table and Chinese age calculator follow the Observatory in all of the months above, including 2057 and 2097.

For the calendar itself, the point is more interesting. The Chinese calendar is exact in principle and, at its edges, cannot be computed in advance: a rule with no tolerance applied to quantities with a nonzero error. Arithmetic calendars avoid this by fixing their rules ahead of time, as the Hebrew calendar does. This one cannot, and so the day a month begins in 2097 is, today, a forecast about the Earth’s rotation.

8 Limits of this note

9 Sources and data

The code and data behind this note are public at github.com/esekercioglu/chinese-calendar-icu: the port of ICU’s astronomy, the independent rebuild, the Observatory’s tables and the generator, under the MIT licence. Every figure on this page comes from its findings.json at commit 83ffe65, also served here as findings.json (CC BY 4.0).

To see whether the ICU in your own Node.js behaves like the one tested here, clone the repository and run npm run check; it takes a few seconds and needs no network. This site’s build runs the same comparison, and fails if the ICU it builds with stops producing the disagreements in Table 1, so this page cannot quietly go stale when Node.js updates.

  1. Hong Kong Observatory. Gregorian–Lunar Calendar Conversion Table, and its note on uncertain new moons. Tables ingested 18 August 2026.
  2. National standard of the People’s Republic of China. GB/T 33661-2017, 农历的编算和颁行 (Calculation and promulgation of the Chinese calendar).
  3. Helmer Aslaksen. The Mathematics of the Chinese Calendar. National University of Singapore, 28 August 2003.
  4. Unicode ICU, release-78.3: chnsecal.cpp and astro.cpp.
  5. Peter Duffett-Smith. Practical Astronomy with your Calculator. Cambridge University Press, 1990 — the edition ICU’s astronomy cites.
  6. Don Cross. Astronomy Engine, version 2.1.19.
  7. Fred Espenak and Jean Meeus. Phases of the Moon, 1901–2000 and 2001–2100. NASA Goddard Space Flight Center. Read 29 September 2026.
  8. Fred Espenak. Uncertainty in Delta T (Huber’s model) and Polynomial expressions for Delta T (Espenak–Meeus; Morrison and Stephenson’s parabola). NASA GSFC.
  9. United States Naval Observatory. Measured ΔT. Read 29 September 2026.

Prose last reviewed 29 September 2026. Corrections are welcome at the address below, and matter more on a page like this than most: if a figure here is wrong, it is wrong in a way someone may already have quoted.