/** * `panchangAtSunrise()` — the panchang the way calendars print it: a * civil date labelled by its sunrise elements, each with the instant it * ends ("Tritiya upto 14:37, then Chaturthi"). * * Every element type returns the **ordered list of spans touching the * vedic day** (sunrise to next sunrise), never a single squashed value. * That renders kshaya and vriddhi honestly: a skipped (kshaya) tithi * shows up as a middle span that begins and ends inside the window; a * doubled (vriddhi) tithi is a single span whose end lies past the next * sunrise. */ 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 PanchangAtSunriseOptions { /** Civil calendar date in `timezone`. */ year: number; /** 1–12. */ month: number; day: number; /** Degrees north-positive. */ latitude: number; /** Degrees east-positive. */ longitude: number; /** IANA zone that defines the civil date, e.g. "Asia/Kathmandu". */ timezone: string; } /** An element together with the span it occupies in the day's window. */ export type ElementSpan = T & { /** Instant the element began; null if already running at window start. */ startsAt: Date | null; /** True end instant — may fall past the window end (a "26:15" on calendars). */ endsAt: Date; }; export interface PanchangAtSunrise { /** Weekday of the sunrise-to-sunrise vedic day. */ vaar: Vaar; /** 'normal' days have a sunrise; polar days/nights do not (see window). */ daylight: 'normal' | 'always-up' | 'always-down'; sunrise: Date | null; sunset: Date | null; /** * The listing window. Normal days: this date's sunrise to the next * date's sunrise (or +24 h if the next date has none). Polar * days/nights: local midnight to the next local midnight. */ window: { start: Date; end: Date; }; /** Ordered spans; `[0]` is the sunrise element — the day's label. */ tithi: ElementSpan[]; nakshatra: ElementSpan[]; yoga: ElementSpan[]; karana: ElementSpan[]; rahuKaal: RahuKaalWindow | null; /** Moon phase at the window start. */ moonPhase: MoonPhase; } /** * The sunrise-labelled panchang of a civil date: elements at sunrise * plus every transition touching the vedic day. * * @example * ```ts * const p = panchangAtSunrise({ * year: 2026, month: 7, day: 2, * latitude: 27.7172, longitude: 85.324, timezone: 'Asia/Kathmandu', * }); * // p.vaar.name → 'Thursday' * // p.tithi[0].name → 'Dwitiya' (krishna), upto p.tithi[0].endsAt 09:53 NPT * // p.tithi[1].name → 'Tritiya' — the label of the *next* civil day * ``` */ export declare function panchangAtSunrise(options: PanchangAtSunriseOptions): PanchangAtSunrise; //# sourceMappingURL=panchangAtSunrise.d.ts.map