Day Pillar Calculation in Bazi
Understand continuous sexagenary-day calculation, fixed epoch requirements, time-zone and day-boundary handling, and why lunar day numbers are insufficient.
Overview
The Day Pillar is the stem-branch position of a normalized local day in a continuous sixty-day cycle. A calculator needs a verified reference epoch or equivalent Julian-day algorithm, historical time-zone handling and an explicit day-boundary doctrine. The lunar day number does not determine the Day Pillar. Births around 23:00 or midnight require particular care because schools can start the sexagenary day at different instants.
At a glance
- Cycle
- Continuous sixty stem-branch days
- Required anchor
- Verified epoch or equivalent Julian-day formula
- Civil-time input
- Historical local time and UTC offset
- Boundary setting
- 23:00 rollover or midnight rollover
- Continuity check
- Adjacent effective days advance one cycle position
- Invalid shortcut
- Lunar day number equals Day Pillar
The Day Pillar advances through one uninterrupted cycle
The sixty canonical stem-branch pairs repeat in order. Once a trusted reference day is known, the target day is found by its integer day offset modulo sixty.
A robust implementation uses a tested epoch or Julian-day conversion and protects continuity across months, years and leap days.
- Pin the epoch with regression cases.
- Check consecutive days at cycle wraparound.
Local time and the effective day boundary come first
A timestamp must be resolved through the correct historical time zone before assigning its effective Bazi day. A local date string without a zone can identify several possible instants.
Under a 23:00 rollover, late Zi hour belongs to the next effective day. Under a midnight rollover, the civil date remains in force until 00:00.
- Declare the rollover doctrine.
- Handle nonexistent or repeated DST times explicitly.
Validation needs invariants, not one online lookup
The implementation should reproduce known reference cases and preserve one-step continuity over broad date ranges. Time-zone and boundary fixtures protect the transition logic.
Independent references can catch a wrong epoch, but comparisons must use the same time zone and rollover convention before differences are called errors.
- Compare like-for-like settings.
- Version the calculation contract.
The Day Pillar is not a standalone identity test
The Day Stem becomes the Day Master in later analysis, but the complete pillar does not alone prove personality, marriage, health or destiny.
If the birth time is uncertain near the day boundary, preserve both candidate charts and avoid choosing one from biographical fit alone.
- No outcome claim from one pillar.
- No retrospective chart selection.
Sources and editorial basis
- Hong Kong Observatory: Heavenly Stems and Earthly Branches香港天文台說明六十干支循環由十干與十二支配對構成,日柱是連續日序中的一個干支索引An official modern reference for the canonical stem and branch orders, the sexagenary cycle, and calendrical use.
- 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.
- OpenFate Editorial Methodologytests/bazi/test-pillar-invariants.ts 驗證連續日期的日干支遞進及早子時/午夜兩種換日口徑,跨界須明示設定OpenFate separates deterministic chart calculation, traditional interpretation, and modern editorial explanation.