UNPKG

better-suncalc

Version:

A tiny TypeScript library for calculating sun/moon positions and phases.

22 lines 925 B
/** * Contains solar solstice dates within a specified time range. */ export type SolsticeData = { /** Summer solstice dates (northern hemisphere) in UTC */ summer: Date[]; /** Winter solstice dates (northern hemisphere) in UTC */ winter: Date[]; }; /** * Finds all solstice events (summer and winter) that occur within the given datetime range. * The algorithm uses a per-year approximate guess, then refines via Newton’s method applied * to the derivative of the sun's declination. * * The function returns an object containing arrays of Date objects for summer and winter solstices. * * @param rangeStart - Starting Date of the range. * @param rangeEnd - Ending Date of the range. * @returns Object with keys 'summer' and 'winter', each an array of Date instances. */ export declare function getSolstices(rangeStart: Date, rangeEnd: Date): SolsticeData; //# sourceMappingURL=solstice.d.ts.map