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.
22 lines
862 B
TypeScript
22 lines
862 B
TypeScript
import { getCalendar } from 'hijri-core';
|
|
import { HijriCalendar } from './HijriCalendar';
|
|
|
|
/**
|
|
* Temporal calendar implementation for the FCNA/ISNA calendar.
|
|
*
|
|
* The Fiqh Council of North America (FCNA) calendar, also used by the Islamic
|
|
* Society of North America (ISNA), determines month starts through astronomical
|
|
* calculation: a new month begins the day after the conjunction (new moon) if
|
|
* that conjunction occurs before 12:00 noon UTC, or two days after if at or
|
|
* after noon. This criterion enables global date-setting without local moon
|
|
* sighting, making it popular for diaspora Muslim communities in North America
|
|
* and Europe.
|
|
*
|
|
* Calendar engine: hijri-core FCNA (Meeus Chapter 49 calculations).
|
|
* Calendar ID: "hijri-fcna"
|
|
*/
|
|
export class FcnaCalendar extends HijriCalendar {
|
|
constructor() {
|
|
super(getCalendar('fcna'));
|
|
}
|
|
}
|