mirror of
https://github.com/acamarata/temporal-hijri.git
synced 2026-07-03 04:10:41 +00:00
Temporal Calendar Protocol implementation for Hijri calendar via hijri-core. Provides HijriCalendar base class, UaqCalendar (UAQ engine), FcnaCalendar (FCNA engine), and convenience singletons uaqCalendar/fcnaCalendar. Calendar protocol: year, month, monthCode, day, daysInMonth, daysInYear, monthsInYear, inLeapYear, dayOfWeek, dayOfYear, weekOfYear, daysInWeek, dateFromFields, yearMonthFromFields, monthDayFromFields, dateAdd, dateUntil, mergeFields. dateAdd applies year/month increments in Hijri coordinate space (correct semantics for variable-length lunar months), then applies days/weeks in ISO space. Day-of-month clamped on month boundary changes. 18 ESM + 8 CJS tests passing. Dual CJS/ESM build.
20 lines
722 B
TypeScript
20 lines
722 B
TypeScript
import { getCalendar } from 'hijri-core';
|
|
import { HijriCalendar } from './HijriCalendar';
|
|
|
|
/**
|
|
* Temporal calendar implementation for the Umm al-Qura calendar.
|
|
*
|
|
* Umm al-Qura is the official calendar of Saudi Arabia, maintained by the
|
|
* King Abdulaziz City for Science and Technology (KACST). It is the most
|
|
* widely used Hijri calendar standard for civil and religious purposes across
|
|
* the Muslim world. Month boundaries are determined by pre-calculated tables
|
|
* rather than real-time moon sighting.
|
|
*
|
|
* Calendar engine: hijri-core UAQ (table-driven, covers 1318-1500 AH).
|
|
* Calendar ID: "hijri-uaq"
|
|
*/
|
|
export class UaqCalendar extends HijriCalendar {
|
|
constructor() {
|
|
super(getCalendar('uaq'));
|
|
}
|
|
}
|