भारत · ग्रहगणित
स्थान उज्जयिनी 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/kala-vibhaga.js

काल-विभाग, the one cut of any cycle, and the day's yāma (Phase B, STEP 1a).

167 lines · 0 exports

प्रमाण: पाठ (SS 1.11-12, 1.28, 2.64; Bhāgavata 3.11.8, 3.11.10) · गणित · स्वामी-परम्परा (Pardeep Sehrawat): K2, K4, K9 and the one-cut rule
लेख · the header

The header, as the file states it

kala-vibhaga.js — काल-विभाग, the one cut of any cycle, and the day's yāma (Phase B, STEP 1a). प्रमाण: पाठ (SS 1.11-12, 1.28, 2.64; Bhāgavata 3.11.8, 3.11.10) · गणित · स्वामी-परम्परा (Pardeep Sehrawat): K2, K4, K9 and the one-cut rule r is the fraction of a cycle, an exact rational 0 <= r < 1 (BigInt num/den): the civil day from sunrise (K1: r = (t - sunrise)/ (next sunrise - sunrise), the door puts each instant at the whole spanda of the turn), a graha's revolution (graha-ghadi.js G1, G2), a place's śeṣa digits. ONE cut serves them all (B.3; owner 2026-11-09T21:18Z "एक ही"): K2 prahara (मुख्य) floor(8 r) + 1, 7.5 ghaṭī each on the civil day — owner 2026-11-09T21:10Z and 21:18Z; template HEAD:267 (स्वामी-परम्परा + गणित) K4 ours, from sunrise ghaṇṭā floor(24 r), minute floor(1440 r) mod 60, second floor(86400 r) mod 60 — owner 21:18Z (स्वामी-परम्परा + गणित). The ghaṇṭā is the horā; its lords follow SS 12.79 (the door names them). K5 muhūrta, equal floor(30 r) + 1, 2 nāḍikā each; an equal muhūrta carries no name — Bhāgavata 3.11.8 "ते द्वे मुहूर्तः" + owner 21:18Z (पाठ + स्वामी-परम्परा). The named muhūrtas stay muhurta.js's (K6, इतर). K7 ghaṭī·vināḍī·prāṇa floor(60 r), floor(3600 r) mod 60, floor(21600 r) mod 6 — SS 1.11-12 (पाठ: 60 nāḍī = the NĀKṢATRA ahorātra, 1.12); the civil day takes the same sixty-fold cut (kala-dvara.js 'savana' calibration) K8 vipala floor(216000 r) mod 60, beside the prāṇa — decision P1: vipala = 1/60 pala [standard; no local text] (गणित; time-units.json, kala-dvara.js) K9 nava digits d_k = floor(k r_(k-1)), r_k = k r_(k-1) - d_k, k = 2..9 (r_1 = r); check floor(24 r) = 12 d2 + 4 d3 + d4 — owner 2026-11-09T20:36Z (स्वामी-परम्परा + गणित) G2 for a graha's cycle also rāśi floor(12 r) and nakṣatra floor(27 r) (opts.graha), as the spec writes them: the twelfth and the twenty-seventh of the cycle from where it started — owner 21:23Z "हर ग्रह की घड़ी", 21:18Z. With opts.place p (the place's fraction of the circle from Meṣa 0) the place's rāśi floor(12 p) (SS 1.28) and nakṣatra floor(27 p) (SS 2.64) stand beside them, labelled (पाठ + गणित). p = r for a body that stood at Meṣa 0 at the epoch; where p != r (graha-ghadi: the Moon's apogee from 90 deg, Rahu from 180 deg backward) the two differ and both carry a flag: which the surfaces show is the owner's to rule. K3 yāma (पाठ) by day floor(4 (t - sunrise)/(sunset - sunrise)) + 1; by night 5 + floor(4 (t - sunset)/(next sunrise - sunset)) — Bhāgavata 3.11.10 "यामाश्चत्वारश्चत्वारो मर्त्यानामहनी उभे" (four by day, four by night); 3.11.8's "six or seven nāḍikā" is printed as the text's words and no number is taken from it; a polar day or night returns null with the reason. The verses are corpus/sources/bhagavata-3-11.json (the website's file, byte-identical). Every value is {value, sutra, pramana, source}; the sutras use ASCII digits. No dependencies, no floating point inside a cut (a number given is taken at its exact binary value), no trigonometry. Browser: window.KalaVibhaga; node: module.exports.
आवश्यक · requires

What it loads

nothing

required by
निर्यात · exports

What it exports

पाठ · the verses it cites

SS verses named in the header

  • SS 1.11verse
    prāṇādiḥ kathito mūrtastruṭyādyo amūrtasaṃjñakaḥ । ṣaḍbhiḥ prāṇairvināḍī syāttatṣaṣṭyā nāḍikā smṛtā ।।
  • SS 1.12verse
    nāḍīṣaṣṭyā tu nākṣatraṃ ahorātraṃ prakīrtitam । tattriṃśatā bhavenmāsaḥ sāvano arkodayaistathā ।।
  • SS 12.79verse
    ūrdhvakrameṇa śaśino māsānāṃ adhipāḥ smṛtāḥ । horeśāḥ sūryatanayādadhoadhaḥ kramaśastathā ।।
  • SS 1.28verse
    vikalānāṃ kalā ṣaṣṭyā tatṣaṣṭyā bhāga ucyate । tattriṃśatā bhavedrāśirbhagaṇo dvādaśaiva te ।।
  • SS 2.64verse
    bhabhogo aṣṭaśatīliptāḥ khāśviśailāstathā titheḥ । grahaliptābhabhogāptā bhāni bhuktyā dinādikam ।।
नलिका · channels

The channels it runs in

कार्य · the functions

Every function, what it calls, who calls it

17 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.

gcd(a, b)lines 39–39

── exact rationals ──────────────────────────────────────────────────────────────────────────────────────────────

calls nothing in the registry
called by norm
floorDiv(a, b)lines 40–40
calls nothing in the registry
called by floorRatio, cut
norm(num, den)lines 41–46
calls gcd
called by q, add, sub, mulInt, divInt, fractionOf
q(x, what)lines 48–57exported

An exact rational from a BigInt, an integer, {num, den}, or a finite double (its exact binary value: ×2 is exact).

add(a, b)lines 58–58
calls norm
called by yama
sub(a, b)lines 59–59
calls norm
called by fractionOf, yama
mulInt(a, n)lines 60–60
calls norm
called by yama
divInt(a, n)lines 61–61
calls norm
called by yama
cmp(a, b)lines 62–62
calls nothing in the registry
called by fractionOf, yama
floorRatio(n, a, b)lines 64–64

floor(n·a/b) for rationals a, b (b > 0)

calls floorDiv
called by yama
fraction(x, what)lines 66–70exported

The fraction of a cycle: 0 <= r < 1, exact.

calls q
called by fractionOf, vibhaga
fractionOf(t, start, end)lines 72–77exported

r = (t - start)/(end - start), exact: K1's civil-day fraction when start, end are the sunrise and the next sunrise.

calls q, cmp, sub, fraction, norm
called by web.ghadiOfDay
cut(r, n)lines 78–78exported
calls floorDiv
called by vibhaga
navaDigits(r)lines 79–83
calls nothing in the registry
called by vibhaga
calls nothing in the registry
called by vibhaga, yama
vibhaga(x, opts)lines 107–142exported

The one cut of a cycle's fraction r: K2, K4, K5, K7, K8, K9; with opts.graha also G2's rāśi floor(12 r) and nakṣatra floor(27 r), and with opts.place p the place's rāśi floor(12 p) and nakṣatra floor(27 p) beside them, labelled (flagged where p != r).

K3: the yāma holding t, with all eight (four of the day, four of the night) as exact instants in the units given.