//#region src/calendar-system/hijri.d.ts /** * Pure math functions for Gregorian <-> Islamic (Hijri) calendar conversion. * * Uses the **tabular Islamic calendar** algorithm - algorithmic and deterministic, * not observation-based. This is the civil tabular calendar (Type II-A, Thursday epoch). * * Islamic epoch: July 16, 622 CE (Julian) = July 19, 622 CE (proleptic Gregorian). * * @module */ /** * Islamic month names (1-indexed by position). */ declare const HIJRI_MONTHS: string[]; /** * Check if a Hijri year is a leap year. * * In the 30-year tabular cycle, years 2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29 * are leap years (Dhu al-Hijjah has 30 days instead of 29). * * @param hy - Hijri year * @returns `true` if the year is a leap year */ declare function isLeapHijriYear(hy: number): boolean; /** * Get the number of days in a Hijri month. * * Odd months (1, 3, 5, 7, 9, 11) have 30 days. * Even months (2, 4, 6, 8, 10) have 29 days. * Month 12 (Dhu al-Hijjah) has 29 days in common years and 30 in leap years. * * @param hy - Hijri year * @param hm - Hijri month (1-indexed, 1 = Muharram, 12 = Dhu al-Hijjah) * @returns Number of days in the month */ declare function hijriMonthLength(hy: number, hm: number): number; /** * Get the total number of days in a Hijri year. * * @param hy - Hijri year * @returns 355 for leap years, 354 for common years */ declare function hijriYearLength(hy: number): number; /** * Convert a Gregorian date to a Hijri (Islamic) date. * * @param gy - Gregorian year * @param gm - Gregorian month (1-indexed, 1 = January) * @param gd - Gregorian day * @returns Hijri year, month (1-indexed), and day * * @example * ```ts * toHijri(2026, 6, 27) // -> { hy: 1448, hm: 1, hd: 1 } * ``` */ declare function toHijri(gy: number, gm: number, gd: number): { hy: number; hm: number; hd: number; }; /** * Convert a Hijri (Islamic) date to a Gregorian date. * * @param hy - Hijri year * @param hm - Hijri month (1-indexed, 1 = Muharram) * @param hd - Hijri day * @returns Gregorian year, month (1-indexed), and day * * @example * ```ts * toGregorian(1448, 1, 1) // -> { gy: 2026, gm: 6, gd: 27 } * ``` */ declare function toGregorian(hy: number, hm: number, hd: number): { gy: number; gm: number; gd: number; }; //#endregion export { HIJRI_MONTHS, hijriMonthLength, hijriYearLength, isLeapHijriYear, toGregorian, toHijri };