What does Moving Festivals and Promotion Calendars conclude, in numbers, about “How Often Festivals Meet: Why a Uniform-Phase Model Fails”?

Answer: Aidilfitri falls within seven days of Chinese New Year in 14 years, and they come in clusters: 1964 to 1966, 1996 to 1998, 2029 to 2031, 2062 to 2063, 2094 to 2096. The clusters are thirty-two or thirty-three years apart, the circuit of Aidilfitri computed in Chapter 1. The program's 1996 to 1998 matches the Kongsi Raya years of the public record, and the next cluster, 2029 to 2031, is close at hand.

Scope of the numbers: Sales series and lead times are illustrative; all calculations are generated by the book's programs. Every festival date follows the official announcement; the book treats the religious and cultural meaning of each festival with respect, passes no judgment on it, and is general analysis, not individualised business advice.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 14, 1964, 1966, 1996, 1998, 2029

Aidilfitri within 7 days of Chinese New Year: 14 years
  1964(-2) 1965(-1) 1966(-2) 1996(-2) 1997(-2) 1998(-2) 2029(-2)
  2030(-2) 2031(-2) 2062(-2) 2063(-2) 2094(-2) 2095(-1) 2096(-2)
Aidilfitri within 7 days of Deepavali: 10 years
  1972(-3) 1973(-3) 2004(-3) 2005(-2) 2006(-3) 2037(-4) 2038(-3)
  2069(-3) 2070(-3) 2071(-3)
gap = festival minus Aidilfitri, days; 156 Aidilfitri checked
Show the full program
# Chapter 5. p51: when Aidilfitri meets Chinese New Year or Deepavali.
# Model: Aidilfitri from the tabular calendar (p11, within a day or
# two of the announced date), Chinese New Year from the solstice rule
# (p32, corrected new moons), Deepavali from the Tula rule (p41).
# For every Aidilfitri 1950-2100 we find the signed gap in days to
# the nearest Chinese New Year and the nearest Deepavali, and list
# the years with a gap of at most W = 7 days (Malaysians call these
# Kongsi Raya and Deepa Raya). Approximate dates; confirm officially.
import math
from datetime import date

RD0, TZ, EPOCH = 1721424.5, 8 / 24, 227015
AY2000, PREC = 23.853, 50.29 / 3600


def rad(x):
    return math.radians(x % 360.0)


def new_moon(k, terms):
    jde = 2451550.09766 + 29.530588861 * k
    if not terms:
        return jde - RD0
    t = k / 1236.85
    e = 1 - 0.002516 * t
    m = rad(2.5534 + 29.10535670 * k)
    mp = rad(201.5643 + 385.81693528 * k)
    f = rad(160.7108 + 390.67050284 * k)
    c = [-0.40720 * math.sin(mp), 0.17241 * e * math.sin(m),
         0.01608 * math.sin(2 * mp), 0.01039 * math.sin(2 * f),
         0.00739 * e * math.sin(mp - m),
         -0.00514 * e * math.sin(mp + m)]
    return jde + math.fsum(c) - RD0


def sun_lon(rd):
    t = (rd + RD0 - 2451545.0) / 36525.0
    m = rad(357.52911 + 35999.05029 * t)
    om = rad(125.04 - 1934.136 * t)
    c = [280.46646, 36000.76983 * t,
         (1.914602 - 0.004817 * t) * math.sin(m),
         0.019993 * math.sin(2 * m), 0.000289 * math.sin(3 * m),
         -0.00569, -0.00478 * math.sin(om)]
    return math.fsum(c) % 360.0


def sun_at(target, lo, hi):
    for _ in range(50):
        mid = (lo + hi) / 2
        if (sun_lon(mid) - target + 180.0) % 360.0 - 180.0 < 0:
            lo = mid
        else:
            hi = mid
    return lo


def deepavali(y, terms):
    ay = AY2000 + (y - 2000) * PREC
    ts = sun_at(180.0 + ay, date(y, 10, 5).toordinal(),
                date(y, 10, 30).toordinal())
    k = int(round((ts + RD0 - 2451550.09766) / 29.530588861)) - 2
    while new_moon(k, terms) <= ts:
        k += 1
    nm = new_moon(k, terms)
    return math.floor(nm + TZ) - 1, ts, nm


def cny(y, terms):
    ws = sun_at(270.0, date(y - 1, 12, 15).toordinal(),
                date(y - 1, 12, 28).toordinal())
    wsd = math.floor(ws + TZ)
    k = int(round((ws + RD0 - 2451550.09766) / 29.530588861)) - 2
    seen = 0
    while True:
        d = math.floor(new_moon(k, terms) + TZ)
        if d > wsd:
            seen += 1
            if seen == 2:
                return d, wsd
        k += 1


def fixed_islamic(y, m, d):
    return (d + 29 * (m - 1) + (6 * m - 1) // 11 + (y - 1) * 354
            + (3 + 11 * y) // 30 + EPOCH - 1)


def festivals(lo, hi):
    raya = [fixed_islamic(h, 10, 1) for h in range(lo - 625, hi - 575)]
    raya = [r for r in raya if lo <= date.fromordinal(r).year <= hi]
    cn = [cny(y, True)[0] for y in range(lo - 1, hi + 2)]
    dv = [deepavali(y, True)[0] for y in range(lo - 1, hi + 2)]
    return raya, cn, dv


def nearest(r, xs):
    return min((x - r for x in xs), key=abs)


W = 7

if __name__ == "__main__":
    raya, cn, dv = festivals(1950, 2100)
    for name, xs in (("Chinese New Year", cn), ("Deepavali", dv)):
        hits = []
        for r in raya:
            g = nearest(r, xs)
            if abs(g) <= W:
                hits.append("{}({:+d})".format(date.fromordinal(r).year, g))
        print("Aidilfitri within {} days of {}: {} years".format(
            W, name, len(hits)))
        for i in range(0, len(hits), 7):
            print("  " + " ".join(hits[i:i + 7]))
    print("gap = festival minus Aidilfitri, days; {} Aidilfitri checked"
          .format(len(raya)))

Single source and citation

Fan, Y. (2026). Moving Festival Calendars in Multicultural Malaysia: Overlaps of Hari Raya, Chinese New Year and Deepavali and the Alignment of Promotional Schedules (Version 1.0.0), Chapter 5: How Often Festivals Meet: Why a Uniform-Phase Model Fails. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-313 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026313,
  author    = {Fan, Yafu},
  title     = {Moving Festival Calendars in Multicultural Malaysia: Overlaps of Hari Raya, Chinese New Year and Deepavali and the Alignment of Promotional Schedules},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book