panchanga 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +272 -0
- package/dist/ayanamsha.d.ts +84 -0
- package/dist/ayanamsha.d.ts.map +1 -0
- package/dist/ayanamsha.js +124 -0
- package/dist/ayanamsha.js.map +1 -0
- package/dist/eclipses.d.ts +58 -0
- package/dist/eclipses.d.ts.map +1 -0
- package/dist/eclipses.js +132 -0
- package/dist/eclipses.js.map +1 -0
- package/dist/elements.d.ts +230 -0
- package/dist/elements.d.ts.map +1 -0
- package/dist/elements.js +603 -0
- package/dist/elements.js.map +1 -0
- package/dist/festivals.d.ts +145 -0
- package/dist/festivals.d.ts.map +1 -0
- package/dist/festivals.js +927 -0
- package/dist/festivals.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/panchanga.d.ts +78 -0
- package/dist/panchanga.d.ts.map +1 -0
- package/dist/panchanga.js +76 -0
- package/dist/panchanga.js.map +1 -0
- package/dist/rules.d.ts +161 -0
- package/dist/rules.d.ts.map +1 -0
- package/dist/rules.js +1058 -0
- package/dist/rules.js.map +1 -0
- package/dist/time.d.ts +306 -0
- package/dist/time.d.ts.map +1 -0
- package/dist/time.js +637 -0
- package/dist/time.js.map +1 -0
- package/dist/types.d.ts +169 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +22 -0
- package/dist/types.js.map +1 -0
- package/package.json +57 -0
package/dist/time.js
ADDED
|
@@ -0,0 +1,637 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* src/time.ts — tz/DST-safe day math, rise/set, and kāla windows.
|
|
3
|
+
*
|
|
4
|
+
* Design notes
|
|
5
|
+
* ────────────
|
|
6
|
+
* • All timezone arithmetic uses built-in Intl.DateTimeFormat with the
|
|
7
|
+
* `timeZone` option — NO external tz library, NO "+24 hours" hacks.
|
|
8
|
+
* nextLocalDayStartUTC increments the local Y-M-D calendar date and
|
|
9
|
+
* recomputes the UTC offset at that new local midnight, so it is correct
|
|
10
|
+
* across spring-forward (23-hour day) and fall-back (25-hour day).
|
|
11
|
+
*
|
|
12
|
+
* • astronomy-engine SearchRiseSet is called with direction +1 (rise) or
|
|
13
|
+
* −1 (set), searching from the UTC instant of local-day midnight with a
|
|
14
|
+
* 1-day window. Elevation goes into Observer.height (sea-level elevation
|
|
15
|
+
* in metres). metersAboveGround is passed as 0 (elevation already in the
|
|
16
|
+
* Observer). Returns null at polar latitudes — never throws.
|
|
17
|
+
*
|
|
18
|
+
* • Kāla window boundaries follow traditional Smārta definitions.
|
|
19
|
+
* CALIBRATION: exact boundaries are validated against Drik Panchang
|
|
20
|
+
* fixtures in Phase 4.
|
|
21
|
+
*/
|
|
22
|
+
import { Observer, SearchRiseSet, Body, } from "astronomy-engine";
|
|
23
|
+
/**
|
|
24
|
+
* Validate a `GeoLocation` at the public boundary, throwing a clear, typed
|
|
25
|
+
* error instead of letting bad input surface as an opaque astronomy-engine /
|
|
26
|
+
* Intl stack trace deep inside the computation.
|
|
27
|
+
*/
|
|
28
|
+
export function validateLocation(loc) {
|
|
29
|
+
if (!loc || typeof loc !== "object") {
|
|
30
|
+
throw new TypeError("location is required (a GeoLocation object)");
|
|
31
|
+
}
|
|
32
|
+
const { latitude, longitude, timeZone, elevationMeters } = loc;
|
|
33
|
+
if (!Number.isFinite(latitude) || latitude < -90 || latitude > 90) {
|
|
34
|
+
throw new RangeError(`invalid latitude: ${latitude} (expected a number in -90..90)`);
|
|
35
|
+
}
|
|
36
|
+
if (!Number.isFinite(longitude) || longitude < -180 || longitude > 180) {
|
|
37
|
+
throw new RangeError(`invalid longitude: ${longitude} (expected a number in -180..180)`);
|
|
38
|
+
}
|
|
39
|
+
if (elevationMeters !== undefined && !Number.isFinite(elevationMeters)) {
|
|
40
|
+
throw new RangeError(`invalid elevationMeters: ${elevationMeters}`);
|
|
41
|
+
}
|
|
42
|
+
if (typeof timeZone !== "string" || timeZone.length === 0) {
|
|
43
|
+
throw new TypeError(`invalid timeZone: ${String(timeZone)} (expected an IANA id)`);
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
// Probe the IANA id; throws RangeError for an unknown zone.
|
|
47
|
+
new Intl.DateTimeFormat("en-US", { timeZone });
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
throw new RangeError(`invalid IANA timeZone: '${timeZone}'`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
// ---------------------------------------------------------------------------
|
|
54
|
+
// Intl parts helper
|
|
55
|
+
// ---------------------------------------------------------------------------
|
|
56
|
+
/**
|
|
57
|
+
* Returns an object whose keys are the `type` fields from
|
|
58
|
+
* `Intl.DateTimeFormat.formatToParts` for the given UTC instant projected
|
|
59
|
+
* into `tz`.
|
|
60
|
+
*/
|
|
61
|
+
function tzParts(utcDate, tz) {
|
|
62
|
+
const fmt = new Intl.DateTimeFormat("en-CA", {
|
|
63
|
+
timeZone: tz,
|
|
64
|
+
year: "numeric",
|
|
65
|
+
month: "2-digit",
|
|
66
|
+
day: "2-digit",
|
|
67
|
+
hour: "2-digit",
|
|
68
|
+
minute: "2-digit",
|
|
69
|
+
second: "2-digit",
|
|
70
|
+
hour12: false,
|
|
71
|
+
});
|
|
72
|
+
const parts = fmt.formatToParts(utcDate);
|
|
73
|
+
const get = (type) => {
|
|
74
|
+
const p = parts.find((x) => x.type === type);
|
|
75
|
+
if (!p)
|
|
76
|
+
throw new Error(`tzParts: missing part type "${type}"`);
|
|
77
|
+
// hour12:false can produce "24" for midnight in some environments; normalise.
|
|
78
|
+
const v = parseInt(p.value, 10);
|
|
79
|
+
return type === "hour" && v === 24 ? 0 : v;
|
|
80
|
+
};
|
|
81
|
+
return {
|
|
82
|
+
year: get("year"),
|
|
83
|
+
month: get("month"),
|
|
84
|
+
day: get("day"),
|
|
85
|
+
hour: get("hour"),
|
|
86
|
+
minute: get("minute"),
|
|
87
|
+
second: get("second"),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Given a local calendar date (year, month 1-based, day) and timezone,
|
|
92
|
+
* returns the UTC `Date` corresponding to 00:00:00 local time on that date.
|
|
93
|
+
*
|
|
94
|
+
* Strategy: start from the UTC Date that *would* be midnight if the offset
|
|
95
|
+
* were 0. Read back the local time to determine whether we are on the same
|
|
96
|
+
* calendar day (positive/zero UTC offsets, e.g. IST) or the previous evening
|
|
97
|
+
* (negative UTC offsets, e.g. EDT). Apply the correct correction in each
|
|
98
|
+
* case. A second Intl read verifies there is no residual (handles the rare
|
|
99
|
+
* DST-transition-at-exactly-midnight edge).
|
|
100
|
+
*
|
|
101
|
+
* This is correct across spring-forward and fall-back because the offset is
|
|
102
|
+
* measured at the resulting instant, not estimated.
|
|
103
|
+
*/
|
|
104
|
+
function localMidnightUTC(year, month, day, tz) {
|
|
105
|
+
// Guess: UTC midnight of the given calendar date (as if offset = 0).
|
|
106
|
+
const guess = new Date(Date.UTC(year, month - 1, day, 0, 0, 0, 0));
|
|
107
|
+
// Read back the local date/time at this UTC instant.
|
|
108
|
+
const p = tzParts(guess, tz);
|
|
109
|
+
const localSecondsFromMidnight = p.hour * 3600 + p.minute * 60 + p.second;
|
|
110
|
+
let candidate;
|
|
111
|
+
if (p.day === day && p.month === month && p.year === year) {
|
|
112
|
+
// Positive-offset (or zero) timezone: at UTC midnight the local clock is
|
|
113
|
+
// already on the target date but a few hours ahead (e.g. 05:30 IST).
|
|
114
|
+
// Subtract the elapsed local seconds to reach local 00:00:00.
|
|
115
|
+
candidate = new Date(guess.getTime() - localSecondsFromMidnight * 1000);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
// Negative-offset timezone (e.g. EDT UTC-4): at UTC midnight the local
|
|
119
|
+
// clock shows the PREVIOUS evening (e.g. 20:00 on day-1). We need to
|
|
120
|
+
// advance forward to the next local midnight.
|
|
121
|
+
const secondsToNextMidnight = 24 * 3600 - localSecondsFromMidnight;
|
|
122
|
+
candidate = new Date(guess.getTime() + secondsToNextMidnight * 1000);
|
|
123
|
+
}
|
|
124
|
+
// Verify — correct any residual (e.g. a DST transition lands exactly at midnight).
|
|
125
|
+
const p2 = tzParts(candidate, tz);
|
|
126
|
+
if (p2.hour !== 0 || p2.minute !== 0 || p2.second !== 0) {
|
|
127
|
+
const residual = (p2.hour * 3600 + p2.minute * 60 + p2.second) * 1000;
|
|
128
|
+
return new Date(candidate.getTime() - residual);
|
|
129
|
+
}
|
|
130
|
+
return candidate;
|
|
131
|
+
}
|
|
132
|
+
// ---------------------------------------------------------------------------
|
|
133
|
+
// 1. tz/DST-safe day math
|
|
134
|
+
// ---------------------------------------------------------------------------
|
|
135
|
+
/**
|
|
136
|
+
* Returns a "YYYY-MM-DD" string for the local calendar date of `date` in `tz`.
|
|
137
|
+
*/
|
|
138
|
+
export function localDayString(date, tz) {
|
|
139
|
+
const p = tzParts(date, tz);
|
|
140
|
+
const y = String(p.year).padStart(4, "0");
|
|
141
|
+
const m = String(p.month).padStart(2, "0");
|
|
142
|
+
const d = String(p.day).padStart(2, "0");
|
|
143
|
+
return `${y}-${m}-${d}`;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Returns the UTC `Date` of 00:00:00 local time in `tz` for whichever
|
|
147
|
+
* calendar date `date` falls on in that timezone.
|
|
148
|
+
*
|
|
149
|
+
* DST-safe: the offset is measured at the actual local midnight, not
|
|
150
|
+
* estimated from the input instant. This handles spring-forward and
|
|
151
|
+
* fall-back correctly.
|
|
152
|
+
*/
|
|
153
|
+
export function startOfLocalDayUTC(date, tz) {
|
|
154
|
+
const p = tzParts(date, tz);
|
|
155
|
+
return localMidnightUTC(p.year, p.month, p.day, tz);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Returns the UTC `Date` of 00:00:00 local time in `tz` for the **next**
|
|
159
|
+
* calendar date after the one `date` falls on in that timezone.
|
|
160
|
+
*
|
|
161
|
+
* DST-safe: increments the local Y-M-D date (not "+24 hours") and recomputes
|
|
162
|
+
* the UTC offset at the new local midnight, so a spring-forward day (23 h)
|
|
163
|
+
* and a fall-back day (25 h) are both handled correctly.
|
|
164
|
+
*/
|
|
165
|
+
export function nextLocalDayStartUTC(date, tz) {
|
|
166
|
+
const p = tzParts(date, tz);
|
|
167
|
+
// Increment the local calendar date by 1 day.
|
|
168
|
+
// We pass p.day + 1 directly to localMidnightUTC; Date.UTC inside that
|
|
169
|
+
// function handles month/year roll-over correctly (e.g. day 32 of month 1
|
|
170
|
+
// becomes day 1 of month 2). We do NOT use "+24 hours" — instead we
|
|
171
|
+
// recompute the UTC offset at the new local midnight, which is what makes
|
|
172
|
+
// this correct across spring-forward (23-hour day) and fall-back (25-hour
|
|
173
|
+
// day) transitions.
|
|
174
|
+
return localMidnightUTC(p.year, p.month, p.day + 1, tz);
|
|
175
|
+
}
|
|
176
|
+
// ---------------------------------------------------------------------------
|
|
177
|
+
// 2. Rise / set
|
|
178
|
+
// ---------------------------------------------------------------------------
|
|
179
|
+
/**
|
|
180
|
+
* Returns a `Date` for the rise or set of the Sun (or Moon) on the local
|
|
181
|
+
* calendar day that `date` falls in for `loc.timeZone`.
|
|
182
|
+
*
|
|
183
|
+
* Searches from local-day midnight UTC with a 1-day window.
|
|
184
|
+
* Returns `null` when no event occurs in the window (polar latitudes).
|
|
185
|
+
* Never throws for polar edge cases.
|
|
186
|
+
*
|
|
187
|
+
* @param direction "rise" → +1 | "set" → −1
|
|
188
|
+
*/
|
|
189
|
+
export function riseSet(direction, date, loc, body = Body.Sun) {
|
|
190
|
+
const observer = new Observer(loc.latitude, loc.longitude, loc.elevationMeters ?? 0);
|
|
191
|
+
const dir = direction === "rise" ? 1 : -1;
|
|
192
|
+
const dayStart = startOfLocalDayUTC(date, loc.timeZone);
|
|
193
|
+
const result = SearchRiseSet(body, observer, dir, dayStart, 1, 0);
|
|
194
|
+
return result ? result.date : null;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Convenience wrapper: moonrise for the local day of `date` at `loc`.
|
|
198
|
+
* Returns `null` if none occurs (polar / libration edge cases).
|
|
199
|
+
*/
|
|
200
|
+
export function moonrise(date, loc) {
|
|
201
|
+
return riseSet("rise", date, loc, Body.Moon);
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Convenience wrapper: sunset for the local day of `date` at `loc`.
|
|
205
|
+
* Returns `null` if none occurs (polar midnight-sun).
|
|
206
|
+
*/
|
|
207
|
+
export function sunset(date, loc) {
|
|
208
|
+
return riseSet("set", date, loc);
|
|
209
|
+
}
|
|
210
|
+
// ---------------------------------------------------------------------------
|
|
211
|
+
// Vāra (weekday) — sunrise-to-sunrise reckoning
|
|
212
|
+
// ---------------------------------------------------------------------------
|
|
213
|
+
/** The 7 vāras (weekdays), index 0 = Sunday (Ravivāra) … 6 = Saturday. */
|
|
214
|
+
export const VARA_NAMES = [
|
|
215
|
+
"Ravivara", "Somavara", "Mangalavara", "Budhavara",
|
|
216
|
+
"Guruvara", "Shukravara", "Shanivara",
|
|
217
|
+
];
|
|
218
|
+
/**
|
|
219
|
+
* Weekday index 0..6 (0 = Sunday) of a local calendar date given as a
|
|
220
|
+
* "YYYY-MM-DD" string. A civil date's weekday is timezone-invariant, so we
|
|
221
|
+
* anchor it at noon UTC (away from any DST/offset edge) and read getUTCDay().
|
|
222
|
+
* Shared by `varaAt`, the kāla-window weekday tables, and the daily aggregator.
|
|
223
|
+
*/
|
|
224
|
+
export function weekdayOfLocalDay(dayString) {
|
|
225
|
+
return new Date(`${dayString}T12:00:00Z`).getUTCDay();
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* The vāra (weekday) governing the instant `date` at `loc`.
|
|
229
|
+
*
|
|
230
|
+
* The pañcāṅga day runs SUNRISE-to-SUNRISE, not civil midnight: the hours
|
|
231
|
+
* between local midnight and sunrise still belong to the PREVIOUS weekday. So
|
|
232
|
+
* we take the local calendar day of `date`, and if `date` falls before that
|
|
233
|
+
* day's sunrise, roll the owning date back one calendar day, then read the
|
|
234
|
+
* weekday of the owning date (a calendar date's weekday is timezone-invariant,
|
|
235
|
+
* so we anchor it at noon UTC).
|
|
236
|
+
*
|
|
237
|
+
* Returns `null` only when sunrise cannot be found (polar day/night).
|
|
238
|
+
*/
|
|
239
|
+
export function varaAt(date, loc) {
|
|
240
|
+
const dayStart = startOfLocalDayUTC(date, loc.timeZone);
|
|
241
|
+
const sr = riseSet("rise", dayStart, loc);
|
|
242
|
+
if (!sr)
|
|
243
|
+
return null;
|
|
244
|
+
let owningDate = localDayString(date, loc.timeZone);
|
|
245
|
+
if (date.getTime() < sr.getTime()) {
|
|
246
|
+
const d = new Date(`${owningDate}T12:00:00Z`);
|
|
247
|
+
d.setUTCDate(d.getUTCDate() - 1);
|
|
248
|
+
owningDate = d.toISOString().slice(0, 10);
|
|
249
|
+
}
|
|
250
|
+
const index = weekdayOfLocalDay(owningDate);
|
|
251
|
+
return { index, name: VARA_NAMES[index] };
|
|
252
|
+
}
|
|
253
|
+
// ---------------------------------------------------------------------------
|
|
254
|
+
// 3. Kāla windows
|
|
255
|
+
// ---------------------------------------------------------------------------
|
|
256
|
+
//
|
|
257
|
+
// Notation used below:
|
|
258
|
+
// D = day length = sunset − sunrise
|
|
259
|
+
// N = night length = nextSunrise − sunset
|
|
260
|
+
// dayMuhurta = D / 15 (one of 15 equal muhurtas in the day)
|
|
261
|
+
// nightMuhurta = N / 15
|
|
262
|
+
// solarNoon = midpoint(sunrise, sunset)
|
|
263
|
+
// solarMidnight = midpoint(sunset, nextSunrise)
|
|
264
|
+
//
|
|
265
|
+
// CALIBRATION: exact boundaries are validated against Drik Panchang fixtures
|
|
266
|
+
// in Phase 4. The definitions used here follow the Smārta / Drik Panchang
|
|
267
|
+
// convention as documented in classical Jyotiṣa texts.
|
|
268
|
+
/**
|
|
269
|
+
* Helper: fetch sunrise for `date` in `loc`. Searches the same local day.
|
|
270
|
+
*/
|
|
271
|
+
function getSunrise(date, loc) {
|
|
272
|
+
return riseSet("rise", date, loc);
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Helper: fetch sunset for `date` in `loc`.
|
|
276
|
+
*/
|
|
277
|
+
function getSunset(date, loc) {
|
|
278
|
+
return riseSet("set", date, loc);
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Helper: fetch sunrise for the **next** local calendar day after `date`.
|
|
282
|
+
* Searches from the next day's local midnight.
|
|
283
|
+
*/
|
|
284
|
+
function getNextSunrise(date, loc) {
|
|
285
|
+
const nextDayStart = nextLocalDayStartUTC(date, loc.timeZone);
|
|
286
|
+
return riseSet("rise", nextDayStart, loc);
|
|
287
|
+
}
|
|
288
|
+
// ---------------------------------------------------------------------------
|
|
289
|
+
// Exported kāla window functions
|
|
290
|
+
// ---------------------------------------------------------------------------
|
|
291
|
+
/**
|
|
292
|
+
* Prātaḥkāla / sunriseWindow
|
|
293
|
+
*
|
|
294
|
+
* Definition: first of the five equal day-parts (pañcāṅga prathamaṁ yāma).
|
|
295
|
+
* [sunrise, sunrise + D/5]
|
|
296
|
+
*
|
|
297
|
+
* This is the "dawn period" when morning rituals and Sandhyā are performed.
|
|
298
|
+
*
|
|
299
|
+
* CALIBRATION: exact boundaries are validated against Drik Panchang
|
|
300
|
+
* fixtures in Phase 4.
|
|
301
|
+
*/
|
|
302
|
+
export function sunriseWindow(date, loc) {
|
|
303
|
+
const sr = getSunrise(date, loc);
|
|
304
|
+
const ss = getSunset(date, loc);
|
|
305
|
+
if (!sr || !ss)
|
|
306
|
+
return null;
|
|
307
|
+
const D = ss.getTime() - sr.getTime();
|
|
308
|
+
return { start: sr, end: new Date(sr.getTime() + D / 5) };
|
|
309
|
+
}
|
|
310
|
+
/** Alias: prātaḥkāla = sunriseWindow (same window, different name). */
|
|
311
|
+
export function pratahkala(date, loc) {
|
|
312
|
+
return sunriseWindow(date, loc);
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Pūrvāhna (forenoon)
|
|
316
|
+
*
|
|
317
|
+
* Definition: [sunrise, sunrise + 3·D/5] — the first three-fifths of the
|
|
318
|
+
* daytime.
|
|
319
|
+
*
|
|
320
|
+
* CALIBRATION (Phase 4, validated against Drik Panchang 2026 New Delhi):
|
|
321
|
+
* Drik's Pūrvāhna-vyāpinī festivals (Akṣaya Tṛtīyā, Vasant Pañcamī, Śāradīya
|
|
322
|
+
* Navrātri Ghaṭasthāpana) resolve to the day on which the festival tithi
|
|
323
|
+
* PERVADES the forenoon by the larger fraction. A solar-noon end (D/2) made
|
|
324
|
+
* Pūrvāhna too SHORT: for Akṣaya Tṛtīyā 2026 the Tṛtīyā begins only at ~10:49
|
|
325
|
+
* IST on Apr 19 (late in a D/2 window), so a D/2 Pūrvāhna gave Apr 20 the
|
|
326
|
+
* larger fraction and the engine picked Apr 20 — but Drik observes Apr 19
|
|
327
|
+
* (Tṛtīyā prevailing through the forenoon, Pūja Muhūrta 10:49–12:20 IST).
|
|
328
|
+
* Widening the END to 3·D/5 captures the post-noon tail of the forenoon that
|
|
329
|
+
* Drik's Pūrvāhna Kāla spans, so Apr 19's pervasion fraction overtakes Apr
|
|
330
|
+
* 20's and the engine matches Drik. Vasant Pañcamī (Jan 23) and Śāradīya
|
|
331
|
+
* Navrātri (Oct 11) are single-day pervasions and are unaffected by the wider
|
|
332
|
+
* end (both remain correct).
|
|
333
|
+
*
|
|
334
|
+
* (Earlier draft = D/2 "solar noon"; the 3·D/5 end is the calibrated value.)
|
|
335
|
+
*/
|
|
336
|
+
export function purvahna(date, loc) {
|
|
337
|
+
const sr = getSunrise(date, loc);
|
|
338
|
+
const ss = getSunset(date, loc);
|
|
339
|
+
if (!sr || !ss)
|
|
340
|
+
return null;
|
|
341
|
+
const D = ss.getTime() - sr.getTime();
|
|
342
|
+
return { start: sr, end: new Date(sr.getTime() + (3 * D) / 5) };
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Madhyāhna (midday period)
|
|
346
|
+
*
|
|
347
|
+
* Definition: third of the five equal day-parts.
|
|
348
|
+
* [sunrise + 2D/5, sunrise + 3D/5]
|
|
349
|
+
*
|
|
350
|
+
* CALIBRATION: exact boundaries are validated against Drik Panchang
|
|
351
|
+
* fixtures in Phase 4.
|
|
352
|
+
*/
|
|
353
|
+
export function madhyahna(date, loc) {
|
|
354
|
+
const sr = getSunrise(date, loc);
|
|
355
|
+
const ss = getSunset(date, loc);
|
|
356
|
+
if (!sr || !ss)
|
|
357
|
+
return null;
|
|
358
|
+
const D = ss.getTime() - sr.getTime();
|
|
359
|
+
return {
|
|
360
|
+
start: new Date(sr.getTime() + (2 * D) / 5),
|
|
361
|
+
end: new Date(sr.getTime() + (3 * D) / 5),
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Aparāhna (afternoon)
|
|
366
|
+
*
|
|
367
|
+
* Definition: fourth of the five equal day-parts.
|
|
368
|
+
* [sunrise + 3D/5, sunrise + 4D/5]
|
|
369
|
+
*
|
|
370
|
+
* CALIBRATION: exact boundaries are validated against Drik Panchang
|
|
371
|
+
* fixtures in Phase 4.
|
|
372
|
+
*/
|
|
373
|
+
export function aparahna(date, loc) {
|
|
374
|
+
const sr = getSunrise(date, loc);
|
|
375
|
+
const ss = getSunset(date, loc);
|
|
376
|
+
if (!sr || !ss)
|
|
377
|
+
return null;
|
|
378
|
+
const D = ss.getTime() - sr.getTime();
|
|
379
|
+
return {
|
|
380
|
+
start: new Date(sr.getTime() + (3 * D) / 5),
|
|
381
|
+
end: new Date(sr.getTime() + (4 * D) / 5),
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Pradoṣa (twilight period)
|
|
386
|
+
*
|
|
387
|
+
* Definition: approximately 3 muhurtas (~1h 12m) after sunset.
|
|
388
|
+
* dayMuhurta = D / 15
|
|
389
|
+
* [sunset, sunset + 3·dayMuhurta]
|
|
390
|
+
*
|
|
391
|
+
* This is the auspicious evening twilight window for Śiva worship.
|
|
392
|
+
*
|
|
393
|
+
* CALIBRATION: exact boundaries are validated against Drik Panchang
|
|
394
|
+
* fixtures in Phase 4.
|
|
395
|
+
*/
|
|
396
|
+
export function pradosha(date, loc) {
|
|
397
|
+
const sr = getSunrise(date, loc);
|
|
398
|
+
const ss = getSunset(date, loc);
|
|
399
|
+
if (!sr || !ss)
|
|
400
|
+
return null;
|
|
401
|
+
const D = ss.getTime() - sr.getTime();
|
|
402
|
+
const dayMuhurta = D / 15;
|
|
403
|
+
return {
|
|
404
|
+
start: ss,
|
|
405
|
+
end: new Date(ss.getTime() + 3 * dayMuhurta),
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Niśīta (midnight muhurta)
|
|
410
|
+
*
|
|
411
|
+
* Definition: one nightMuhurta centred on solar midnight.
|
|
412
|
+
* nightMuhurta = N / 15
|
|
413
|
+
* solarMidnight = midpoint(sunset, nextSunrise)
|
|
414
|
+
* [solarMidnight − nightMuhurta/2, solarMidnight + nightMuhurta/2]
|
|
415
|
+
*
|
|
416
|
+
* This is the most auspicious hour of the night for Devi worship and
|
|
417
|
+
* midnight Śiva pūjā.
|
|
418
|
+
*
|
|
419
|
+
* CALIBRATION: exact boundaries are validated against Drik Panchang
|
|
420
|
+
* fixtures in Phase 4.
|
|
421
|
+
*/
|
|
422
|
+
export function nishita(date, loc) {
|
|
423
|
+
const ss = getSunset(date, loc);
|
|
424
|
+
const nextSr = getNextSunrise(date, loc);
|
|
425
|
+
if (!ss || !nextSr)
|
|
426
|
+
return null;
|
|
427
|
+
const N = nextSr.getTime() - ss.getTime();
|
|
428
|
+
const nightMuhurta = N / 15;
|
|
429
|
+
const solarMidnight = new Date(ss.getTime() + N / 2);
|
|
430
|
+
return {
|
|
431
|
+
start: new Date(solarMidnight.getTime() - nightMuhurta / 2),
|
|
432
|
+
end: new Date(solarMidnight.getTime() + nightMuhurta / 2),
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Brahma-muhūrta (pre-dawn auspicious period)
|
|
437
|
+
*
|
|
438
|
+
* Definition: two muhurtas before sunrise.
|
|
439
|
+
* dayMuhurta = D / 15
|
|
440
|
+
* [sunrise − 2·dayMuhurta, sunrise − dayMuhurta]
|
|
441
|
+
*
|
|
442
|
+
* The optimal time for meditation, Vedic study, and rising.
|
|
443
|
+
*
|
|
444
|
+
* NOTE: dayMuhurta is computed from the *current* day's sunrise/sunset so
|
|
445
|
+
* the window length reflects the current day length, which is the Drik
|
|
446
|
+
* Panchang convention.
|
|
447
|
+
*
|
|
448
|
+
* CALIBRATION: exact boundaries are validated against Drik Panchang
|
|
449
|
+
* fixtures in Phase 4.
|
|
450
|
+
*/
|
|
451
|
+
export function brahmaMuhurta(date, loc) {
|
|
452
|
+
const sr = getSunrise(date, loc);
|
|
453
|
+
const ss = getSunset(date, loc);
|
|
454
|
+
if (!sr || !ss)
|
|
455
|
+
return null;
|
|
456
|
+
const D = ss.getTime() - sr.getTime();
|
|
457
|
+
const dayMuhurta = D / 15;
|
|
458
|
+
return {
|
|
459
|
+
start: new Date(sr.getTime() - 2 * dayMuhurta),
|
|
460
|
+
end: new Date(sr.getTime() - dayMuhurta),
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Aruṇodaya ("break of dawn") — the pre-sunrise window that aruṇodaya-vyāpinī
|
|
465
|
+
* observances key on (e.g. the start of an Ekādaśī / vrata fast, and snāna
|
|
466
|
+
* timing).
|
|
467
|
+
*
|
|
468
|
+
* CONVENTION: 4 ghaṭikās before sunrise. A ghaṭikā (nāḍikā) is 24 minutes, so
|
|
469
|
+
* this is a FIXED 96 minutes: [sunrise − 96 min, sunrise]. This matches the
|
|
470
|
+
* Drik Panchang aruṇodaya convention. (Some texts instead use 4/60 of the full
|
|
471
|
+
* ahorātra — sunrise-to-sunrise — which is night-length dependent; that variant
|
|
472
|
+
* is NOT used here.)
|
|
473
|
+
*
|
|
474
|
+
* Returns null if the day has no sunrise (polar).
|
|
475
|
+
*/
|
|
476
|
+
export function arunodaya(date, loc) {
|
|
477
|
+
const sr = getSunrise(date, loc);
|
|
478
|
+
if (!sr)
|
|
479
|
+
return null;
|
|
480
|
+
const GHATIKA_MS = 24 * 60 * 1000;
|
|
481
|
+
return {
|
|
482
|
+
start: new Date(sr.getTime() - 4 * GHATIKA_MS),
|
|
483
|
+
end: sr,
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
// ---------------------------------------------------------------------------
|
|
487
|
+
// Auspicious / inauspicious day-part windows (Rāhu / Yama / Gulika / Abhijit)
|
|
488
|
+
// ---------------------------------------------------------------------------
|
|
489
|
+
//
|
|
490
|
+
// The daytime [sunrise, sunset] is split into 8 equal parts. Rāhu Kāla,
|
|
491
|
+
// Yamaganda and Gulika each occupy ONE part, selected by the vāra (weekday).
|
|
492
|
+
// The tables are indexed by weekday 0 = Sunday … 6 = Saturday and give the
|
|
493
|
+
// 1-based part number (part 1 = the first eighth after sunrise). These are the
|
|
494
|
+
// standard Smārta / Drik Panchang assignments.
|
|
495
|
+
/** Rāhu Kāla part (1..8) by weekday (0 = Sunday). */
|
|
496
|
+
const RAHU_SEGMENT = [8, 2, 7, 5, 6, 4, 3];
|
|
497
|
+
/** Yamaganda part (1..8) by weekday (0 = Sunday). */
|
|
498
|
+
const YAMA_SEGMENT = [5, 4, 3, 2, 1, 7, 6];
|
|
499
|
+
/** Gulika Kāla part (1..8) by weekday (0 = Sunday). */
|
|
500
|
+
const GULIKA_SEGMENT = [7, 6, 5, 4, 3, 2, 1];
|
|
501
|
+
/** Weekday (0 = Sunday) of the civil day of `date` in `loc`'s timezone. */
|
|
502
|
+
function civilWeekday(date, loc) {
|
|
503
|
+
return weekdayOfLocalDay(localDayString(date, loc.timeZone));
|
|
504
|
+
}
|
|
505
|
+
/** The `seg`-th eighth (1..8) of the daytime starting at sunrise `sr`. */
|
|
506
|
+
function dayEighth(sr, D, seg) {
|
|
507
|
+
const eighth = D / 8;
|
|
508
|
+
return {
|
|
509
|
+
start: new Date(sr.getTime() + (seg - 1) * eighth),
|
|
510
|
+
end: new Date(sr.getTime() + seg * eighth),
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
/** Common sunrise/sunset/day-length fetch; null at polar latitudes. */
|
|
514
|
+
function dayArc(date, loc) {
|
|
515
|
+
const sr = getSunrise(date, loc);
|
|
516
|
+
const ss = getSunset(date, loc);
|
|
517
|
+
if (!sr || !ss)
|
|
518
|
+
return null;
|
|
519
|
+
const D = ss.getTime() - sr.getTime();
|
|
520
|
+
if (D <= 0)
|
|
521
|
+
return null;
|
|
522
|
+
return { sr, D };
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Rāhu Kāla — the inauspicious eighth-of-day governed by Rāhu, by weekday.
|
|
526
|
+
* Returns null if the day has no sunrise/sunset (polar).
|
|
527
|
+
*/
|
|
528
|
+
export function rahuKala(date, loc) {
|
|
529
|
+
const arc = dayArc(date, loc);
|
|
530
|
+
if (!arc)
|
|
531
|
+
return null;
|
|
532
|
+
return dayEighth(arc.sr, arc.D, RAHU_SEGMENT[civilWeekday(date, loc)]);
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Yamaganda (Yama Kaṇṭaka) — the inauspicious eighth-of-day governed by Yama.
|
|
536
|
+
*/
|
|
537
|
+
export function yamaganda(date, loc) {
|
|
538
|
+
const arc = dayArc(date, loc);
|
|
539
|
+
if (!arc)
|
|
540
|
+
return null;
|
|
541
|
+
return dayEighth(arc.sr, arc.D, YAMA_SEGMENT[civilWeekday(date, loc)]);
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* Gulika Kāla (Gulikai / Mānda) — the eighth-of-day governed by Gulika. Unlike
|
|
545
|
+
* Rāhu/Yama it is treated as AUSPICIOUS for some saṁskāras, but inauspicious
|
|
546
|
+
* for travel/new ventures; we return the window and leave the verdict to the
|
|
547
|
+
* caller.
|
|
548
|
+
*/
|
|
549
|
+
export function gulikaKala(date, loc) {
|
|
550
|
+
const arc = dayArc(date, loc);
|
|
551
|
+
if (!arc)
|
|
552
|
+
return null;
|
|
553
|
+
return dayEighth(arc.sr, arc.D, GULIKA_SEGMENT[civilWeekday(date, loc)]);
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* Abhijit Muhūrta — the auspicious 8th of the 15 day-muhūrtas, centred on solar
|
|
557
|
+
* noon.
|
|
558
|
+
* dayMuhurta = D / 15; [sunrise + 7·dayMuhurta, sunrise + 8·dayMuhurta]
|
|
559
|
+
*
|
|
560
|
+
* NOTE: by tradition Abhijit is considered void/inauspicious on Wednesday; this
|
|
561
|
+
* function returns the window regardless (the verdict is left to the caller).
|
|
562
|
+
*/
|
|
563
|
+
export function abhijitMuhurta(date, loc) {
|
|
564
|
+
const arc = dayArc(date, loc);
|
|
565
|
+
if (!arc)
|
|
566
|
+
return null;
|
|
567
|
+
const dayMuhurta = arc.D / 15;
|
|
568
|
+
return {
|
|
569
|
+
start: new Date(arc.sr.getTime() + 7 * dayMuhurta),
|
|
570
|
+
end: new Date(arc.sr.getTime() + 8 * dayMuhurta),
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Compute Rāhu Kāla, Yamaganda, Gulika and Abhijit in ONE pass, resolving the
|
|
575
|
+
* day's sunrise/sunset a single time. Calling the four functions separately
|
|
576
|
+
* searches sunrise+sunset four times over; this shares one `dayArc`. Returns
|
|
577
|
+
* all-null at polar latitudes (no sunrise/sunset).
|
|
578
|
+
*/
|
|
579
|
+
export function dayMuhurtas(date, loc) {
|
|
580
|
+
const arc = dayArc(date, loc);
|
|
581
|
+
if (!arc)
|
|
582
|
+
return { rahuKala: null, yamaganda: null, gulika: null, abhijit: null };
|
|
583
|
+
const wd = civilWeekday(date, loc);
|
|
584
|
+
const dayMuhurta = arc.D / 15;
|
|
585
|
+
return {
|
|
586
|
+
rahuKala: dayEighth(arc.sr, arc.D, RAHU_SEGMENT[wd]),
|
|
587
|
+
yamaganda: dayEighth(arc.sr, arc.D, YAMA_SEGMENT[wd]),
|
|
588
|
+
gulika: dayEighth(arc.sr, arc.D, GULIKA_SEGMENT[wd]),
|
|
589
|
+
abhijit: {
|
|
590
|
+
start: new Date(arc.sr.getTime() + 7 * dayMuhurta),
|
|
591
|
+
end: new Date(arc.sr.getTime() + 8 * dayMuhurta),
|
|
592
|
+
},
|
|
593
|
+
};
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* Saṅkrānti Puṇya-kāla
|
|
597
|
+
*
|
|
598
|
+
* Auspicious window around a solar saṅkrānti (the Sun's entry into a new
|
|
599
|
+
* rāśi).
|
|
600
|
+
*
|
|
601
|
+
* Rule (Smārta, Drik Panchang convention):
|
|
602
|
+
* • If the saṅkrānti moment is BEFORE that day's sunset:
|
|
603
|
+
* puṇya-kāla = [saṅkrānti moment, sunset of that day]
|
|
604
|
+
* • If the saṅkrānti moment is AFTER that day's sunset (rare — near
|
|
605
|
+
* solstice in western timezones):
|
|
606
|
+
* puṇya-kāla = [nextSunrise, sunset of next day]
|
|
607
|
+
* (the "after sunset → next sunrise" shift rule)
|
|
608
|
+
*
|
|
609
|
+
* Returns null if any required rise/set is unavailable (polar latitudes).
|
|
610
|
+
*
|
|
611
|
+
* CALIBRATION: exact boundaries are validated against Drik Panchang
|
|
612
|
+
* fixtures in Phase 4.
|
|
613
|
+
*
|
|
614
|
+
* @param moment The UTC instant of the saṅkrānti.
|
|
615
|
+
* @param loc Observer location.
|
|
616
|
+
*/
|
|
617
|
+
export function sankrantiPunyaKala(moment, loc) {
|
|
618
|
+
const ss = getSunset(moment, loc);
|
|
619
|
+
if (!ss)
|
|
620
|
+
return null;
|
|
621
|
+
if (moment.getTime() <= ss.getTime()) {
|
|
622
|
+
// Saṅkrānti before sunset: window runs from the moment to that sunset.
|
|
623
|
+
return { start: moment, end: ss };
|
|
624
|
+
}
|
|
625
|
+
else {
|
|
626
|
+
// Saṅkrānti after sunset: shift to next day — start at next sunrise,
|
|
627
|
+
// end at next day's sunset.
|
|
628
|
+
const nextSr = getNextSunrise(moment, loc);
|
|
629
|
+
if (!nextSr)
|
|
630
|
+
return null;
|
|
631
|
+
const nextSs = getSunset(nextSr, loc);
|
|
632
|
+
if (!nextSs)
|
|
633
|
+
return null;
|
|
634
|
+
return { start: nextSr, end: nextSs };
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
//# sourceMappingURL=time.js.map
|
package/dist/time.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.js","sourceRoot":"","sources":["../src/time.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EACL,QAAQ,EACR,aAAa,EACb,IAAI,GACL,MAAM,kBAAkB,CAAC;AAqB1B;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAgB;IAC/C,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QACpC,MAAM,IAAI,SAAS,CAAC,6CAA6C,CAAC,CAAC;IACrE,CAAC;IACD,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IAC/D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,QAAQ,GAAG,CAAC,EAAE,IAAI,QAAQ,GAAG,EAAE,EAAE,CAAC;QAClE,MAAM,IAAI,UAAU,CAAC,qBAAqB,QAAQ,iCAAiC,CAAC,CAAC;IACvF,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,SAAS,GAAG,CAAC,GAAG,IAAI,SAAS,GAAG,GAAG,EAAE,CAAC;QACvE,MAAM,IAAI,UAAU,CAAC,sBAAsB,SAAS,mCAAmC,CAAC,CAAC;IAC3F,CAAC;IACD,IAAI,eAAe,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,Q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