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