Calculation Methodology & Dataset Provenance
Complete documentation of our astronomical lunisolar calendar engine, traditional age reckoning rules, Qing Dynasty manuscript provenance, and technical limitations.
1. Astronomical Engine & National Standards
Our application performs all calendar arithmetic using lunar-typescript (v1.8.6), an open-source, zero-dependency lunisolar engine compliant with China National Standard:
The calendar conversion algorithms compute high-precision astronomical ephemerides, calculating:
- True Solar Terms (二十四节气): Determined by the Sun's celestial longitude in the ecliptic coordinate system (multiples of 15°).
- Synodic New Moon (朔日): Pinpointed to the precise day when the Moon and Sun share the exact ecliptic longitude.
- Sexagenary Cycle (干支历): Accurate derivation of Heavenly Stems (天干) and Earthly Branches (地支) for Year, Month, Day, and Hour.
2. Supported Date Range & Ephemeris Scope
3. Nominal Lunar Age (Xūsuì / 虚岁) Convention
In traditional East Asian societies, age reckoning differs fundamentally from the Western chronological model (Zhōusuì / 周岁):
The Chinese New Year Boundary Rule: If the mother was born between January 1 and Chinese New Year Day (which fluctuates between January 21 and February 20), her lunar birth year is the preceding lunar year. Our engine calculates this boundary automatically to prevent common 1-to-2 year calculation errors.
4. Prediction Chart Source & Dataset Canonization
Our application implements the canonical Qing Dynasty Imperial Tomb Manuscript (清宫生男生女表), historically archived in imperial collections and reproduced in traditional Chinese Tong Sheng (通胜) almanacs.
Both the interactive chart ([`InteractiveGenderChart`](file:///C:/Users/acer/.gemini/antigravity/scratch/chinese-gender-predictor/src/components/chart/InteractiveGenderChart.tsx)), the main prediction calculator ([`genderPrediction.ts`](file:///C:/Users/acer/.gemini/antigravity/scratch/chinese-gender-predictor/src/lib/calculations/genderPrediction.ts)), and the conception planner ([`conceptionPlannerEngine.ts`](file:///C:/Users/acer/.gemini/antigravity/scratch/chinese-gender-predictor/src/lib/planner/conceptionPlannerEngine.ts)) reference the exact same underlying matrix dataset ([`chartDataset.ts`](file:///C:/Users/acer/.gemini/antigravity/scratch/chinese-gender-predictor/src/lib/chart/chartDataset.ts)).
5. Limitations & Non-Guessing Policy
- Strict Age Boundaries (Ages 18–45): The original Qing Dynasty manuscript contains no empirical data for maternal ages under 18 or over 45. While many internet websites fabricate random extrapolation algorithms, our platform maintains historical integrity by displaying an explicit "Outside Historical Scope" state rather than guessing.
- Intercalary Leap Months (闰月): We adhere to the traditional 15-day almanac rule: days 1–15 are evaluated as the base month; days 16 through the end of the leap month resolve to the following month.
- Scientific & Diagnostic Limitations: Peer-reviewed empirical evaluations (most notably the Karolinska Institute demographic study of 2.8 million Swedish births by Villamor et al.) demonstrate that the Chinese Gender Chart has an actual accuracy rate of 50.2%, exactly matching random probability. This tool is intended for cultural preservation, historical exploration, and lighthearted entertainment.