验算 Public Verification

BaZi calculator test cases

These fixed examples make the calculator's boundary rules inspectable. Each row publishes the input, effective time, and expected Four Pillars used by the automated regression tests.

Version 1.0.0 Updated 2026-08-02 Download JSON

Declared scope

Rules before results

The cases verify this calculator's published implementation. They do not claim that every BaZi school uses the same day boundary or astronomical method.

  1. The Year Pillar changes at Li Chun.
  2. Month Pillars change at the 12 month-starting Jie solar terms.
  3. The entered civil date determines the Day Pillar; 23:00 does not automatically advance the day in this implementation.
  4. Zi hour covers 23:00 through 00:59.
  5. Optional longitude correction changes the effective hour used for the Hour Pillar, not the entered civil date.
  6. City UTC offsets are static and do not include a historical daylight-saving database.
  7. Hidden Stems and personalized Da Yun starting ages are not calculated by the current public calculator.
01

year boundary

Li Chun changes the BaZi year

For 2024, the mean solar-term calculation places Li Chun on February 4. The Year Pillar does not change on January 1 or Lunar New Year.

Verifies Year and Month Pillars immediately before and on the Li Chun boundary.
Observation Input Effective time Year Month Day Hour
Before Li Chun 2024-02-03
12:00
12:00 癸卯 乙丑 丁酉 丙午
On Li Chun 2024-02-04
12:00
12:00 甲辰 丙寅 戊戌 戊午

Expected difference: The Year Pillar changes from Gui Mao (癸卯) to Jia Chen (甲辰), and the Month Pillar enters Bing Yin (丙寅).

Test ID: li-chun-2024

02

month boundary

A Jie term changes the Month Pillar

BaZi months use the 12 month-starting Jie terms. For this 2024 test, Jing Zhe falls on March 5 under the published mean-term method.

Verifies Month Pillars immediately before and on the Jing Zhe boundary.
Observation Input Effective time Year Month Day Hour
Before Jing Zhe 2024-03-04
12:00
12:00 甲辰 丙寅 丁卯 丙午
On Jing Zhe 2024-03-05
12:00
12:00 甲辰 丁卯 戊辰 戊午

Expected difference: The Month Pillar changes from Bing Yin (丙寅) to Ding Mao (丁卯); it does not wait for the first day of a Gregorian or lunar month.

Test ID: jing-zhe-2024

03

hour boundary

23:00 enters Zi hour without changing the Day Pillar

This implementation uses the entered civil date for the Day Pillar and maps 23:00 through 00:59 to Zi hour. Other BaZi schools may use a different day-boundary convention.

Verifies Hour Pillar behavior immediately before and at 23:00 on the same entered date.
Observation Input Effective time Year Month Day Hour
Before Zi hour 2024-02-10
22:00
22:00 甲辰 丙寅 甲辰 乙亥
Start of Zi hour 2024-02-10
23:00
23:00 甲辰 丙寅 甲辰 甲子

Expected difference: The Hour Pillar changes from Yi Hai (乙亥) to Jia Zi (甲子), while the Day Pillar remains Jia Chen (甲辰).

Test ID: zi-hour-2024

04

solar time

Longitude correction can change the Hour Pillar

Chengdu is stored at 104.1 degrees east with UTC+8. Against the 120-degree standard meridian, the published formula gives a -63.6 minute correction.

Verifies Civil clock time compared with the optional longitude-corrected effective time.
Observation Input Effective time Year Month Day Hour
Civil clock time 2024-02-10
02:00
02:00 甲辰 丙寅 甲辰 乙丑
Longitude corrected 2024-02-10
02:00
00:56 -63.6 min 甲辰 丙寅 甲辰 甲子

Expected difference: The correction moves the effective time from Chou hour to Zi hour, changing Yi Chou (乙丑) to Jia Zi (甲子). The entered date and Day Pillar do not change.

Test ID: chengdu-solar-time-2024

范围 What is not tested

Calculation evidence, not a prediction claim

These cases verify deterministic calendar and time-handling behavior. They do not scientifically validate personality or future predictions. The current public calculator does not calculate Hidden Stems, weighted chart strength, favorable elements, or personalized Da Yun starting ages.

Mean solar-term offsets are intended for 1900-2100, while the lunar conversion table covers 1900-2049. Historical daylight-saving and political timezone changes must be checked independently.