UNPKG

salat-first

Version:

Islamic prayer times calculation with special support for Moroccan methods and Maliki madhab

81 lines (80 loc) 3.33 kB
/** * Utility class for astronomical calculations */ export declare class Astronomy { /** * Calculates the Julian day for a given date * @param year The year * @param month The month (1-12) * @param day The day * @param hours The hours (0-23) * @returns The Julian day */ static julianDay(year: number, month: number, day: number, hours?: number): number; /** * Calculates the Julian century for a given Julian day * @param julianDay The Julian day * @returns The Julian century */ static julianCentury(julianDay: number): number; /** * Calculates the mean solar longitude in degrees * @param julianCentury The Julian century * @returns The mean solar longitude in degrees */ static meanSolarLongitude(julianCentury: number): number; /** * Calculates the mean solar anomaly in degrees * @param julianCentury The Julian century * @returns The mean solar anomaly in degrees */ static meanSolarAnomaly(julianCentury: number): number; /** * Calculates the equation of the center of the Sun in degrees * @param julianCentury The Julian century * @param meanAnomaly The mean anomaly in degrees * @returns The equation of the center in degrees */ static solarEquationOfCenter(julianCentury: number, meanAnomaly: number): number; /** * Calculates the apparent solar longitude in degrees * @param julianCentury The Julian century * @param meanLongitude The mean longitude in degrees * @returns The apparent solar longitude in degrees */ static apparentSolarLongitude(julianCentury: number, meanLongitude: number): number; /** * Calculates the altitude of a celestial body in degrees * @param observerLatitude The observer's latitude in degrees * @param declination The declination of the celestial body in degrees * @param localHourAngle The local hour angle of the celestial body in degrees * @returns The altitude of the celestial body in degrees */ static altitudeOfCelestialBody(observerLatitude: number, declination: number, localHourAngle: number): number; /** * Calculates the days since the winter solstice * @param dayOfYear The day of the year (1-366) * @param year The year * @param latitude The latitude in degrees * @returns The number of days since the winter solstice */ static daysSinceSolstice(dayOfYear: number, year: number, latitude: number): number; /** * Adjusts the morning twilight time based on the season and latitude * @param latitude The latitude in degrees * @param day The day of the year (1-366) * @param year The year * @param sunrise The sunrise time * @returns The adjusted morning twilight time */ static adjustMorningTwilight(latitude: number, day: number, year: number, sunrise: Date): Date; /** * Adjusts the evening twilight time based on the season and latitude * @param latitude The latitude in degrees * @param day The day of the year (1-366) * @param year The year * @param sunset The sunset time * @returns The adjusted evening twilight time */ static adjustEveningTwilight(latitude: number, day: number, year: number, sunset: Date): Date; }