Gregorian–Chinese Calendar Date Conversion
Convert Gregorian and Chinese lunisolar dates safely by preserving leap months, local dates and the distinction between calendar labels and Bazi boundaries.
Overview
Gregorian–Chinese calendar conversion maps one validated civil date to its Chinese lunisolar year, month, day and leap-month status, or performs the reverse mapping. It is not a simple fixed offset: lunisolar months follow astronomical new moons, leap months depend on solar-term rules, and the same month number can occur twice in a leap year. The conversion must preserve whether the month is regular or leap, use a supported year range and retain the local date basis. For Bazi, conversion is only an input-normalization step. The Year and Month Pillars still follow solar-term boundaries, while the Day and Hour Pillars follow continuous chronology and the declared day boundary.
At a glance
- Gregorian calendar
- Civil solar date with leap-year rules
- Chinese calendar
- Lunisolar year, month and day
- Required field
- Regular or leap month
- Not a fixed offset
- New moons and solar-term rules vary by year
- Bazi distinction
- Calendar conversion does not set every pillar
- Verification
- Round-trip within the supported range
Identify the source calendar and complete date first
A date such as “the eighth day of the fourth month” is incomplete without the lunisolar year and whether that month was the regular or leap occurrence. A Gregorian date likewise needs its proleptic or historical-calendar interpretation when older records are involved.
Store the source label separately from the converted result. Silent assumptions make later pillar discrepancies impossible to diagnose.
- Require the year, month, day and calendar type.
- Preserve the leap-month flag as data, not prose.
Lunisolar conversion follows year-specific astronomical structure
Chinese months are tied to lunar phases, while solar terms keep the lunisolar year aligned with the solar cycle. A leap month is inserted by rule and does not occur on a fixed Gregorian schedule.
Use a maintained conversion implementation or an authoritative year table within its declared range. Hong Kong Observatory tables cover 1901–2100 and note that future phase or solar-term estimates near midnight can change the recorded date by one day as predictions improve.
- Check the implementation’s supported range.
- Do not derive lunar dates by subtracting a fixed number of days.
Keep conversion separate from Four Pillars boundaries
A converted lunar birthday can recover the corresponding civil date, but the Bazi year does not automatically begin on lunar day one and the Bazi month does not begin on lunar month day one. Year and month decisions require exact solar-term comparisons.
The Day Pillar belongs to a continuous sixty-day chronology, and the Hour Pillar requires the resolved local time and day stem. Calendar labels should never overwrite those calculation layers.
- Convert first, then run the complete pillar pipeline.
- Do not use lunar month names as Month Pillars.
Round-trip conversions and test every leap-month edge
For each supported record, convert source to target and back under the same rules. The round trip should recover the original date and leap-month state, including the first and last day of every leap month.
Also test new-moon and midnight-adjacent records, invalid dates, range limits and historical reforms. When evidence cannot select one date, return labeled candidates rather than a fabricated exact answer.
- Test regular and leap instances of the same month number.
- Fail clearly outside the verified range.
Sources and editorial basis
- Hong Kong Observatory: The Chinese Agricultural Calendar香港天文台說明中國農曆以月相月份配合太陽年並按中氣規則置閏,公曆農曆轉換必須保留閏月身分與支援年代An official overview of how the Chinese agricultural calendar combines solar and lunar cycles, including months, leap months, and solar terms.
- Hong Kong Observatory: The 24 Solar Terms香港天文台把節氣作為獨立天文時間點列示,支持把日期換算與八字年、月柱節氣邊界分層處理An official astronomical explanation of the 24 solar terms, their 15-degree divisions along the ecliptic, and the alternating major and minor terms.
- OpenFate Editorial Methodology產品以香港天文台公曆農曆錨點、閏月首末日與雙向回轉測試換算,完成日期正規化後才執行完整四柱管線OpenFate separates deterministic chart calculation, traditional interpretation, and modern editorial explanation.