From f0e29858491fca85aa60d8bec22cd80c1de07b46 Mon Sep 17 00:00:00 2001 From: Aric Camarata Date: Sun, 8 Mar 2026 17:30:55 -0400 Subject: [PATCH] style: fix prettier table formatting in wiki --- .wiki/API-Reference.md | 64 +++++++++++++++++++++--------------------- .wiki/Architecture.md | 12 ++++---- .wiki/Home.md | 8 +++--- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/.wiki/API-Reference.md b/.wiki/API-Reference.md index 21b76dc..ce3c75b 100644 --- a/.wiki/API-Reference.md +++ b/.wiki/API-Reference.md @@ -5,16 +5,16 @@ ```typescript // Classes export { HijriCalendar } from 'temporal-hijri'; -export { UaqCalendar } from 'temporal-hijri'; -export { FcnaCalendar } from 'temporal-hijri'; +export { UaqCalendar } from 'temporal-hijri'; +export { FcnaCalendar } from 'temporal-hijri'; // Singletons -export { uaqCalendar } from 'temporal-hijri'; // new UaqCalendar() +export { uaqCalendar } from 'temporal-hijri'; // new UaqCalendar() export { fcnaCalendar } from 'temporal-hijri'; // new FcnaCalendar() // Types (re-exported from hijri-core) export type { HijriDate, ConversionOptions } from 'temporal-hijri'; -export type { HijriCalendarOptions } from 'temporal-hijri'; +export type { HijriCalendarOptions } from 'temporal-hijri'; ``` --- @@ -36,7 +36,7 @@ Accepts any engine registered via hijri-core's `registerCalendar()`. The calenda ## `UaqCalendar` ```typescript -new UaqCalendar() +new UaqCalendar(); ``` Wraps the `uaq` engine from hijri-core. Calendar ID: `"hijri-uaq"`. @@ -46,7 +46,7 @@ Wraps the `uaq` engine from hijri-core. Calendar ID: `"hijri-uaq"`. ## `FcnaCalendar` ```typescript -new FcnaCalendar() +new FcnaCalendar(); ``` Wraps the `fcna` engine from hijri-core. Calendar ID: `"hijri-fcna"`. @@ -59,38 +59,38 @@ All methods are available on `HijriCalendar`, `UaqCalendar`, and `FcnaCalendar`. ### Field accessors -| Method | Signature | Returns | Notes | -|---|---|---|---| -| `year` | `(date: PlainDate) => number` | Hijri year | | -| `month` | `(date: PlainDate) => number` | Hijri month (1-12) | | -| `monthCode` | `(date: PlainDate) => string` | `"M01"` – `"M12"` | Zero-padded | -| `day` | `(date: PlainDate) => number` | Day of month (1-29/30) | | +| Method | Signature | Returns | Notes | +| ----------- | ----------------------------- | ---------------------- | ----------- | +| `year` | `(date: PlainDate) => number` | Hijri year | | +| `month` | `(date: PlainDate) => number` | Hijri month (1-12) | | +| `monthCode` | `(date: PlainDate) => string` | `"M01"` – `"M12"` | Zero-padded | +| `day` | `(date: PlainDate) => number` | Day of month (1-29/30) | | ### Year and month metrics -| Method | Signature | Returns | Notes | -|---|---|---|---| -| `daysInMonth` | `(date: PlainDate) => number` | 29 or 30 | Varies by month and calendar | -| `daysInYear` | `(date: PlainDate) => number` | 354 or 355 | Sum of all 12 months | -| `monthsInYear` | `(date: PlainDate) => number` | Always 12 | | -| `inLeapYear` | `(date: PlainDate) => boolean` | `true` if 355-day year | | +| Method | Signature | Returns | Notes | +| -------------- | ------------------------------ | ---------------------- | ---------------------------- | +| `daysInMonth` | `(date: PlainDate) => number` | 29 or 30 | Varies by month and calendar | +| `daysInYear` | `(date: PlainDate) => number` | 354 or 355 | Sum of all 12 months | +| `monthsInYear` | `(date: PlainDate) => number` | Always 12 | | +| `inLeapYear` | `(date: PlainDate) => boolean` | `true` if 355-day year | | ### Week and day position -| Method | Signature | Returns | Notes | -|---|---|---|---| -| `dayOfWeek` | `(date: PlainDate) => number` | 1-7 (Mon=1, Sun=7) | ISO weekday | -| `dayOfYear` | `(date: PlainDate) => number` | 1-354 or 1-355 | Within the Hijri year | -| `weekOfYear` | `(date: PlainDate) => number` | 1-51 | `ceil(dayOfYear / 7)` | -| `daysInWeek` | `(date: PlainDate) => number` | Always 7 | | +| Method | Signature | Returns | Notes | +| ------------ | ----------------------------- | ------------------ | --------------------- | +| `dayOfWeek` | `(date: PlainDate) => number` | 1-7 (Mon=1, Sun=7) | ISO weekday | +| `dayOfYear` | `(date: PlainDate) => number` | 1-354 or 1-355 | Within the Hijri year | +| `weekOfYear` | `(date: PlainDate) => number` | 1-51 | `ceil(dayOfYear / 7)` | +| `daysInWeek` | `(date: PlainDate) => number` | Always 7 | | ### Construction from fields -| Method | Signature | Returns | -|---|---|---| -| `dateFromFields` | `(fields: {year, month, day}, options?) => PlainDate` | ISO `PlainDate` | -| `yearMonthFromFields` | `(fields: {year, month}, options?) => PlainYearMonth` | ISO `PlainYearMonth` | -| `monthDayFromFields` | `(fields: {month, day, year?}, options?) => PlainMonthDay` | ISO `PlainMonthDay` | +| Method | Signature | Returns | +| --------------------- | ---------------------------------------------------------- | -------------------- | +| `dateFromFields` | `(fields: {year, month, day}, options?) => PlainDate` | ISO `PlainDate` | +| `yearMonthFromFields` | `(fields: {year, month}, options?) => PlainYearMonth` | ISO `PlainYearMonth` | +| `monthDayFromFields` | `(fields: {month, day, year?}, options?) => PlainMonthDay` | ISO `PlainMonthDay` | `monthDayFromFields` uses year 1444 AH as a default reference if no year is supplied. @@ -124,10 +124,10 @@ Computes the difference between two dates. When `largestUnit` is `'years'` or `' ### Other -| Method | Signature | Returns | -|---|---|---| +| Method | Signature | Returns | +| ------------- | -------------------------------------- | ------------------- | | `mergeFields` | `(fields, additionalFields) => Record` | Merged field object | -| `toString` | `() => string` | Calendar identifier | +| `toString` | `() => string` | Calendar identifier | --- diff --git a/.wiki/Architecture.md b/.wiki/Architecture.md index c5a952b..471cc58 100644 --- a/.wiki/Architecture.md +++ b/.wiki/Architecture.md @@ -113,12 +113,12 @@ hijri-core provides: The package ships two formats from a single TypeScript source: -| File | Format | Usage | -|---|---|---| -| `dist/index.mjs` | ESM | `import { uaqCalendar } from 'temporal-hijri'` | -| `dist/index.cjs` | CommonJS | `const { uaqCalendar } = require('temporal-hijri')` | -| `dist/index.d.ts` | Type declarations (CJS) | TypeScript + CJS | -| `dist/index.d.mts` | Type declarations (ESM) | TypeScript + ESM | +| File | Format | Usage | +| ------------------ | ----------------------- | --------------------------------------------------- | +| `dist/index.mjs` | ESM | `import { uaqCalendar } from 'temporal-hijri'` | +| `dist/index.cjs` | CommonJS | `const { uaqCalendar } = require('temporal-hijri')` | +| `dist/index.d.ts` | Type declarations (CJS) | TypeScript + CJS | +| `dist/index.d.mts` | Type declarations (ESM) | TypeScript + ESM | Both `hijri-core` and `@js-temporal/polyfill` are declared `external` in the build config and listed as peer dependencies. They are not bundled. diff --git a/.wiki/Home.md b/.wiki/Home.md index ecfc046..32e09a9 100644 --- a/.wiki/Home.md +++ b/.wiki/Home.md @@ -18,10 +18,10 @@ This package provides `UaqCalendar` and `FcnaCalendar` as plug-in calendar objec ## Calendar systems -| Calendar | ID | Description | -|---|---|---| -| Umm al-Qura | `hijri-uaq` | Official Saudi calendar, table-driven, covers 1318-1500 AH | -| FCNA/ISNA | `hijri-fcna` | North American standard, astronomical new moon calculation | +| Calendar | ID | Description | +| ----------- | ------------ | ---------------------------------------------------------- | +| Umm al-Qura | `hijri-uaq` | Official Saudi calendar, table-driven, covers 1318-1500 AH | +| FCNA/ISNA | `hijri-fcna` | North American standard, astronomical new moon calculation | ## Requirements