Bazi calculation · Continuous day count

Julian Day Numbers and Day Pillar Calculation

Learn how a validated civil birth date becomes a continuous day count and a reproducible Bazi Day Pillar without noon or day-boundary errors.

Simplified Chinese
儒略日序与日柱计算
Traditional Chinese
儒略日序與日柱計算
Pinyin
Rúlüè Rìxù yǔ Rìzhù Jìsuàn
Also known as
Julian day count for Bazi · continuous day number and Day Pillar · JDN Day Pillar method

Editorially reviewed:

Overview

A Day Pillar needs a continuous chronology, not a month-by-month lookup shortcut. After validating the source calendar, birth location and effective Bazi day boundary, the calculation maps the resolved civil instant to a documented Julian Day or integer day-number convention. It then measures the offset from a tested sexagenary anchor and reduces that offset modulo sixty. Julian Date begins at noon in its astronomical definition, while civil dates usually begin at midnight and some Bazi schools change the day at 23:00, so the normalization rule must be explicit before the cycle index is calculated.

At a glance

Purpose
Place dates on one continuous chronology
Astronomical Julian Date
Changes at noon UTC
Required normalization
A declared integer-day convention
Cycle calculation
Offset from a tested anchor modulo 60
Bazi dependency
The chosen local day boundary is applied first
Primary failure mode
An unnoticed half-day or one-day shift

A continuous day count removes month and calendar irregularities

Civil months have unequal lengths, leap years insert dates, and historical records may use different calendars. Converting a validated date to one continuous count gives the Day-Pillar algorithm a stable chronological distance between any two dates.

The original date and calendar label still matter and should be retained. The day count is a normalization layer, not a replacement for source provenance.

  • Validate the date under its stated calendar.
  • Preserve the original and normalized values.

Julian Date and civil-day integers do not share the same rollover

Astronomical Julian Date starts a new numbered day at noon UTC. Many software formulas use a midnight-adjusted integer such as a Julian Day Number, but implementations differ in when they floor or add one half.

Before applying the sixty-day cycle, define the exact timestamp basis, the rounding operation and the effective Bazi day. Mixing these conventions is the common source of an off-by-one Day Pillar.

  • Document noon, midnight and flooring behavior.
  • Do not copy a formula without its epoch convention.

Calculate from a verified sexagenary anchor and modulo sixty

Choose a historical date whose stem-branch day is independently verified under the same calendar and boundary convention. Subtract its normalized day number from the target day number, add the anchor index, and use a non-negative modulo-sixty operation.

The anchor, index numbering and modulo implementation form one contract. Changing any one of them without updating the others shifts every result while still producing plausible-looking stem-branch names.

  • Store the anchor date and its cycle index together.
  • Normalize negative remainders for dates before the anchor.

Prove the implementation with adjacent-day and long-range invariants

A reliable implementation checks that the previous and next effective days move exactly one position, that sixty days returns the same pair, and that leap days and calendar reforms do not interrupt the chronological sequence.

Boundary tests must also cover births around local midnight, the selected 23:00 rule, offset transitions and calendar conversions. Interpretation begins only after those calculation states are settled.

  • Test anchors on both sides of leap and reform dates.
  • Keep chronology tests separate from interpretation.

Sources and editorial basis

  1. U.S. Naval Observatory: Julian Date Converter
    美國海軍天文台說明儒略日期以連續日數表達時間,並提供格里曆與儒略曆輸入換算;天文儒略日的正午起算須在整數日序前明確正規化An official astronomical reference for converting Gregorian and Julian calendar dates to a continuous Julian Date timeline.
  2. OpenFate Editorial Methodology
    產品以版本化基準日、非負六十取模及前後一日與六十日不變式校驗日柱,並把曆法、時區與八字換日規則分層處理OpenFate separates deterministic chart calculation, traditional interpretation, and modern editorial explanation.
Was this article helpful?

Search the Wiki