Internal module guide. This module is now part of
@astrology/vedic; use the public package README for application setup.
dasha module
Vimshottari (Vimshottari dasha, the 120-year cycle of nine planetary periods) birth balance, nested timeline and active-period lookup. Public imports use the package root. See the package specification and task plan (V-05).
Run pnpm --filter @astrology/vedic build, check, and test after building dependencies (pnpm build:vedic builds all).
Timeline
computeBirthBalance uses Binder’s Moon nakshatra (one of 27 equal 13°20′ lunar mansions) id and computes only the elapsed fraction inside
it; a longitude outside that nakshatra is a boundary contract failure. dividePeriod is the one
proportional splitter: boundaries come from cumulative weights and the last child ends exactly at
its parent. buildVimshottariTimeline keeps the nominal start of a partially elapsed first
mahadasha (top-level period), subdivides full nominal parents (never the remaining balance), supports depth 2–4
(default 3) and rounds instants once to milliseconds. The instants are exact moments. Day arithmetic is days × 86 400 000; no
calendar, timezone or clock is read.
findActivePeriods is half-open, returns an empty chain before the nominal start, and reports the
cycle index after 120 years. VIMSHOTTARI_RULES holds the nine-lord sequence and the supported year
lengths (365.25, 360, 365.2425); the profile selects one.