# Korean saju has four calendar edge cases that break naive date math

> Source: <https://dev.to/kfortune/korean-saju-has-four-calendar-edge-cases-that-break-naive-date-math-228g>
> Published: 2026-12-05 23:28:52+00:00

**Recommendation:** Move deterministic arithmetic like calendar and pillar computation out of the model into tested code, and pass the computed result to the LLM only for interpretation.
More in the playbook "Verifying model output": <https://wpnews.pro/playbooks/output-verification>

Every "Year of the Goat" post you will read this month assumes 2027 starts on the same day. For a saju (four pillars) chart it does not even start at the same month boundary. I spent the last weeks building an English-language voice reader for Korean saju, and almost none of the hard work was the LLM. It was the calendar.

Here are four places where naive date math quietly produces the wrong chart.

Both Korean saju and Chinese BaZi change the year pillar at Ipchun (立春), the "start of spring" solar term. In 2027 that is February 4. Lunar New Year is February 6.

A baby born on February 5, 2027 is a Goat in saju and still a Horse in the popular lunar count. Same baby, two animals, depending on which rule your code implements.

If you build on `getFullYear()` or on a lunar calendar library alone, you get the wrong year pillar for everyone born in that gap.

Month pillars turn on the twelve jeol solar terms — Sohan, Ipchun, Gyeongchip and so on — not on the first of the month. Those terms are astronomical events with a time, not a date.

The subtle bug: the same instant is a different local time in Seoul and in Beijing. Korea computes terms in KST (UTC+9); many BaZi implementations compute them in Beijing time (UTC+8). A birth within an hour of a term boundary gets a different month pillar under the two conventions, and that changes the ten-god mapping derived from it.

Store term times as UTC instants, then convert with the birth location's offset. Do not store "Feb 4" as a date.

Korean saju commonly starts the new day at 23:00 — the "night rat hour" convention — while many Chinese schools roll the day at 00:00. Someone born at 23:30 gets two different day pillars under the two rules, and the day pillar is the one Korean readers look at first for relationships and work.

Pick one convention, write it down in the product, and test it. If you "fix" it later, every chart you already generated changes.

Korea's standard meridian is 135°E, but Seoul sits near 127°E — about 32 minutes of solar offset. Korean saju explicitly corrects for this (진태양시). Plenty of implementations do not.

Half an hour of clock time is enough to cross a two-hour hour-pillar boundary. Two apps, same birth certificate, different hour pillar, and then two different readings of the same life.

The failure mode is not that the model is wrong. It is that it is plausible.

Ask a model to "calculate the four pillars" and it will happily produce eight characters that look right, with the correct hanja and the correct format. They are guesses. The chart is deterministic arithmetic; the model should never be the one doing it.

The shape that worked for us:

```
chart = saju.chart(
    birth=Birth(dt_utc=..., tz="Asia/Seoul", place=seoul),
    year_boundary="ipchun",
    day_rollover="23:00",
    true_solar_time=True,
)

prompt = render(chart)         # eight characters + ten gods + luck cycle
answer = reader_voice(prompt)  # the model interprets, never computes
```

Then the golden tests that actually caught bugs:

I built K-Fortune on top of this: Korean saju read in English, out loud, by a set of AI reader voices. You enter a birth date, time and place, choose a voice, and the reading is generated from the computed chart instead of a sun-sign template. There is a one-minute free call to hear the format; a full five-minute reading is $7.99.

[https://k-saju-voice.onrender.com](https://k-saju-voice.onrender.com)

These are AI readers, not human fortune tellers, and the purpose is self-reflection and entertainment — not medical, legal or financial advice.

Two things I am still unsure about.

If you have built consumer voice products, I would like to hear how you handle both.
