UNPKG

salat-first

Version:

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

61 lines (60 loc) 1.93 kB
/** * Adds a specified number of days to a date * @param date The date to add days to * @param days The number of days to add * @returns A new date with the days added */ export declare function addDays(date: Date, days: number): Date; /** * Adds a specified number of minutes to a date * @param date The date to add minutes to * @param minutes The number of minutes to add * @returns A new date with the minutes added */ export declare function addMinutes(date: Date, minutes: number): Date; /** * Adds a specified number of seconds to a date * @param date The date to add seconds to * @param seconds The number of seconds to add * @returns A new date with the seconds added */ export declare function addSeconds(date: Date, seconds: number): Date; /** * Rounds a date to the nearest minute * @param date The date to round * @returns A new date rounded to the nearest minute */ export declare function roundToNearestMinute(date: Date): Date; /** * Gets the day of the year (1-366) * @param date The date * @returns The day of the year */ export declare function dayOfYear(date: Date): number; /** * Checks if a year is a leap year * @param year The year * @returns Whether the year is a leap year */ export declare function isLeapYear(year: number): boolean; /** * Gets the hours and minutes from a decimal hour * @param decimalHour The decimal hour (e.g., 12.5 for 12:30) * @returns An object with hours and minutes */ export declare function hoursMinutesFromDecimal(decimalHour: number): { hours: number; minutes: number; }; /** * Formats a date in HH:MM format * @param date The date to format * @returns The formatted time string */ export declare function formatTime(date: Date): string; /** * Formats a date in 12-hour format with AM/PM * @param date The date to format * @returns The formatted time string */ export declare function formatTime12Hour(date: Date): string;