/** * `panchang()` — the five limbs of the Vedic day, plus sunrise, sunset, * Rahu Kaal, and moon phase, for one instant at one place. * * Semantics: elements (tithi, nakshatra, yoga, karana) are computed **at * the given instant**, not frozen at sunrise. The vaar follows the vedic * sunrise-to-sunrise day; sunrise/sunset/Rahu Kaal belong to the instant's * local calendar date in `timezone`. */ import { type MoonPhase } from '@grahan/core'; import { type Karana } from './karana.js'; import { type Nakshatra } from './nakshatra.js'; import { type RahuKaalWindow } from './rahuKaal.js'; import { type Tithi } from './tithi.js'; import { type Vaar } from './vaar.js'; import { type Yoga } from './yoga.js'; export interface PanchangOptions { /** The instant to compute for (a JS Date is always an exact UTC instant). */ date: Date; /** Degrees north-positive. */ latitude: number; /** Degrees east-positive. */ longitude: number; /** IANA zone that defines the local calendar date, e.g. "Asia/Kathmandu". */ timezone: string; } export interface Panchang { vaar: Vaar; tithi: Tithi; nakshatra: Nakshatra; yoga: Yoga; karana: Karana; /** 'normal' days have sunrise/sunset; polar days/nights do not. */ daylight: 'normal' | 'always-up' | 'always-down'; /** Local-date sunrise, or null on polar days/nights. */ sunrise: Date | null; sunset: Date | null; /** Weekday-indexed eighth of daylight; null when there is no daylight cycle. */ rahuKaal: RahuKaalWindow | null; moonPhase: MoonPhase; } /** * Compute the panchang for an instant at a location. * * @example * ```ts * const p = panchang({ * date: new Date('1993-08-18T05:15:00Z'), // 11:00 NPT * latitude: 27.0104, * longitude: 84.8821, * timezone: 'Asia/Kathmandu', * }); * // p.tithi → { index: 0, paksha: 'shukla', name: 'Pratipada' } * // p.nakshatra → { index: 9, name: 'Magha', pada: 3 } * // p.vaar.name → 'Wednesday' * ``` */ export declare function panchang(options: PanchangOptions): Panchang; //# sourceMappingURL=panchang.d.ts.map