भारत · ग्रहगणित
स्थान उज्जयिनी Ujjayinī · change it on a tool⌕ search the कोश ⌘Kप्रहर — · —:—:—ours, from sunriseउज्जयिनी —:—:—UTC + λ/15 h, λ = 75.7682° E (D13)IST Error −26.9 minlocal mean time − IST = 4λ − 330 min (K12)engine 3f94072the site ↗

yantra/patha/dasha.js

विंशोत्तरी दशा to five levels (mahā, antar, pratyantar, sūkṣma, prāṇa), exact, as Parāśara computes it.

146 lines · 0 exports

प्रमाण: पाठ BPHS ch. 46 (Viṃśottarī as the local edition carries it) · गणित (exact rational periods of the turn)
लेख · the header

The header, as the file states it

dasha.js — विंशोत्तरी दशा to five levels (mahā, antar, pratyantar, sūkṣma, prāṇa), exact, as Parāśara computes it. प्रमाण: पाठ BPHS ch. 46 (Viṃśottarī as the local edition carries it) · गणित (exact rational periods of the turn) Text (corpus/bphs/canon.json, Bṛhat Parāśara Horā Śāstra): 46.12 from Kṛttikā, three rounds, the lords in order: Sūrya, Candra, Kuja, Rāhu, Guru, Śani, Budha, Ketu, Śukra ("ā caṃ ku rā gu śa bu ke śu"); 46.13 count from Kṛttikā to the birth nakṣatra; the remainder by nine gives the lord whose daśā runs at birth; 46.14 the full life is 120 years; 46.15 years: 6, 10, 7, 18, 16, 19, 17, 7, 20. (The e-text repeats "navacandrāḥ" (19) where Budha's 17 belongs; the text's own total of 120 in 46.14 fixes it: the eight legible numbers sum to 103.) 46.16 the elapsed part of the birth daśā = its years × bhayāta ÷ bhabhoga (time gone in the birth nakṣatra over its whole span); the rest is the balance (bhogya); 51.1-2 antardaśā = daśā × the sub-lord's own years ÷ 120, the daśā lord's own first, then in order; 61.1, 62.1 ("kha-arka" = 120), 63.1 ("kha-sūrya" = 120): the same rule for pratyantar, sūkṣma and prāṇa. BPHS does not say how long a daśā year is. The default is the text's year — twelve solar months (Sūrya-Siddhānta 14.10), 1,577,917,828 ÷ 4,320,000 civil days — and the owner may choose another (see YEAR). Every period is an exact rational number of spandas of the turn (the engine's clock, kala-dvara.js: a civil day is 30⁸·R/S of them, owner D1/D1a/D1c); at every level the children add up to the parent exactly. Browser: window.Dasha (needs window.Panchanga, window.KalaDvara); node: module.exports.
आवश्यक · requires

What it loads

required by
निर्यात · exports

What it exports

पाठ · the verses it cites

SS verses named in the header

none in the registry

नलिका · channels

The channels it runs in

कार्य · the functions

Every function, what it calls, who calls it

19 top-level functions read from the source; the doc line is the comment above each; calls and callers are resolved across the registry’s modules by name. Line numbers are the file’s at engine 3f94072.

build(P)lines 25–143
gcd(a, b)lines 38–38
calls nothing in the registry
called by build, q
add(a, b)lines 40–40exported
calls q
sub(a, b)lines 41–41exported
mul(a, b)lines 42–42exported
div(a, b)lines 43–43exported
calls q
called by build, birthState
cmp(a, b)lines 44–44exported
calls nothing in the registry
called by build, chainAt
asQ(x)lines 46–46

an instant in spandas of the turn: a BigInt or an exact {num, den}

floorQ(a)lines 47–47
calls nothing in the registry
called by build, toCivil
lordOfNakshatra(n)lines 50–54exported

46.12-46.13: the lord (0…8) of a nakṣatra (1 = Aśvinī … 27 = Revatī).

calls nothing in the registry
called by build, mahadashas
yearOf(opts)lines 55–66exported
calls q
called by build, mahadashas
yearsToSpandas(years, year)lines 68–68exported

Years (rational) → spandas of the turn (rational): years × civil days a year × N·R/S.

calls mul, q
called by build, mahadashas

Mahādaśās from a birth instant (spandas of the turn, BigInt or {num, den}), the birth nakṣatra (1…27) and the elapsed fraction of it ({num, den}).

subPeriods(period)lines 86–97exported

51.1-2, 61.1, 62.1, 63.1: the nine sub-periods of a period, the period's own lord first.

calls sub, mul, q, add
called by build, chainAt
chainAt(md, instant, depth = 5)lines 99–109exported

The chain of periods (down to `depth` levels, max 5) running at an instant (spandas, BigInt or {num, den}).

called by build
birthState(tDays, opts)lines 113–126exported

Birth state from a birth instant (days since the Kali epoch): the Moon's nakṣatra and the elapsed part of it, by time (bhayāta ÷ bhabhoga, 46.16 — the default) or by arc (the Moon's distance into the nakṣatra over 800′).

calls asQ, div, sub, q
called by build, vimshottari
vimshottari(tDays, opts)lines 128–131exported

Vimśottarī from a birth instant (days since the Kali epoch).

called by build

A rational count of spandas of the turn → civil date and local mean time at a site (deśāntara in degrees of the civil day).

calls add, mul, asQ, q, floorQ
called by build