Menu

Modeling 64-Hexagram Jingfang Najia & True Solar Time in TypeScript: Deterministic Calendar Engineering
📰

Modeling 64-Hexagram Jingfang Najia & True Solar Time in TypeScript: Deterministic Calendar Engineering

DEV Community: typescript·Poon·2 days ago
#OhFhW7gX
#devtotypescript#devto#dev#solar#time
Long article (489 words) — no AI summary yet.
Reading 0:00
15s threshold

Traditional East Asian calendar systems—such as the 60-term Sexagenary Cycle (Ganzhi), 24 Solar Terms, and 64-hexagram Jingfang Najia (Six-Line I Ching)—are often treated as fuzzy folklore, yet underneath they are pure deterministic state machines rooted in spherical astronomy and binary combinatorics.

When building a zero-registration, edge-delivered charting workspace, we ran into four subtle engineering problems that cause web calculators to disagree on edge cases. Here is how we modeled them cleanly in TypeScript.

1. Solar Longitude vs. Civil Calendar Boundaries

In the classical Four Pillars (BaZi) calendar, months do not switch on the 1st of a Gregorian or Lunar month.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.