mirror of
https://github.com/acamarata/temporal-hijri.git
synced 2026-06-30 19:04:29 +00:00
chore: P1 standardization — finalize src/wiki/ci
This commit is contained in:
parent
bc8f70ba0b
commit
c4ee5efe96
22 changed files with 3300 additions and 166 deletions
9
.github/wiki/_Sidebar.md
vendored
9
.github/wiki/_Sidebar.md
vendored
|
|
@ -6,9 +6,16 @@
|
|||
|
||||
**Examples**
|
||||
- [Basic Usage](examples/basic-usage)
|
||||
- [Scheduling Display](examples/scheduling-display)
|
||||
|
||||
**API**
|
||||
- [HijriCalendar](api/HijriCalendar)
|
||||
- [UaqCalendar](api/UaqCalendar)
|
||||
- [FcnaCalendar](api/FcnaCalendar)
|
||||
- [Singletons](api/singletons)
|
||||
- [Full API Reference](API-Reference)
|
||||
|
||||
**Reference**
|
||||
- [API Reference](API-Reference)
|
||||
- [Architecture](Architecture)
|
||||
- [Benchmarks](benchmarks/index)
|
||||
|
||||
|
|
|
|||
99
.github/wiki/examples/scheduling-display.md
vendored
Normal file
99
.github/wiki/examples/scheduling-display.md
vendored
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
# Example: Scheduling Display with Hijri Dates
|
||||
|
||||
A common need in calendaring apps for Muslim communities is displaying both the
|
||||
Gregorian and Hijri dates for an event. This example shows how to take a list of
|
||||
event dates, annotate each with its Hijri date, and display it in a human-readable
|
||||
format.
|
||||
|
||||
## Setup
|
||||
|
||||
```typescript
|
||||
import { Temporal } from '@js-temporal/polyfill';
|
||||
import { uaqCalendar } from 'temporal-hijri';
|
||||
```
|
||||
|
||||
## Month name lookup
|
||||
|
||||
The calendar returns numeric months (1-12). Map them to names:
|
||||
|
||||
```typescript
|
||||
const HIJRI_MONTHS = [
|
||||
'Muharram', 'Safar', 'Rabi al-Awwal', 'Rabi al-Thani',
|
||||
'Jumada al-Ula', 'Jumada al-Akhira', 'Rajab', 'Shaban',
|
||||
'Ramadan', 'Shawwal', 'Dhul-Qadah', 'Dhul-Hijja',
|
||||
];
|
||||
|
||||
function hijriMonthName(month: number): string {
|
||||
return HIJRI_MONTHS[month - 1] ?? 'Unknown';
|
||||
}
|
||||
```
|
||||
|
||||
## Format a single date
|
||||
|
||||
```typescript
|
||||
function formatWithHijri(isoDateStr: string): string {
|
||||
const isoDate = Temporal.PlainDate.from(isoDateStr);
|
||||
const hy = uaqCalendar.year(isoDate);
|
||||
const hm = uaqCalendar.month(isoDate);
|
||||
const hd = uaqCalendar.day(isoDate);
|
||||
|
||||
const monthName = hijriMonthName(hm);
|
||||
return `${isoDateStr} (${hd} ${monthName} ${hy} AH)`;
|
||||
}
|
||||
```
|
||||
|
||||
## Annotate a schedule
|
||||
|
||||
```typescript
|
||||
const events = [
|
||||
{ title: 'Project kickoff', date: '2025-01-01' },
|
||||
{ title: 'Mid-year review', date: '2025-06-15' },
|
||||
{ title: 'Year-end summary', date: '2025-12-31' },
|
||||
];
|
||||
|
||||
for (const event of events) {
|
||||
console.log(`${event.title}: ${formatWithHijri(event.date)}`);
|
||||
}
|
||||
```
|
||||
|
||||
Output:
|
||||
|
||||
```
|
||||
Project kickoff: 2025-01-01 (2 Rajab 1446 AH)
|
||||
Mid-year review: 2025-06-15 (19 Dhul-Hijja 1446 AH)
|
||||
Year-end summary: 2025-12-31 (11 Jumada al-Akhira 1447 AH)
|
||||
```
|
||||
|
||||
## Find the start of Ramadan for a given Hijri year
|
||||
|
||||
```typescript
|
||||
function ramadanStart(hijriYear: number): Temporal.PlainDate {
|
||||
// 1 Ramadan = month 9, day 1
|
||||
return uaqCalendar.dateFromFields({ year: hijriYear, month: 9, day: 1 });
|
||||
}
|
||||
|
||||
const ramadan1447 = ramadanStart(1447);
|
||||
console.log(ramadan1447.toString()); // 2026-02-18 (approximate)
|
||||
```
|
||||
|
||||
## Count days until an event in Hijri months
|
||||
|
||||
```typescript
|
||||
const today = Temporal.Now.plainDateISO();
|
||||
const eid = uaqCalendar.dateFromFields({ year: 1447, month: 10, day: 1 });
|
||||
const diff = uaqCalendar.dateUntil(today, eid, { largestUnit: 'months' });
|
||||
|
||||
console.log(`Eid al-Fitr 1447 is in ${diff.months} month(s) and ${diff.days} day(s)`);
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- Month names are transliterated from Arabic. Adapt the spelling to your style guide.
|
||||
- UAQ covers 1318-1500 AH. For dates outside that range, substitute `fcnaCalendar`.
|
||||
- `Temporal.Now.plainDateISO()` returns the current date in the host's local calendar.
|
||||
It does not return a Hijri date directly; pass the result to the calendar methods
|
||||
to get Hijri coordinates.
|
||||
|
||||
---
|
||||
|
||||
[Home](../Home) · [Basic Usage](basic-usage) · [API Reference](../API-Reference)
|
||||
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
|
|
@ -78,3 +78,25 @@ jobs:
|
|||
grep "README.md" pack-output.txt
|
||||
grep "CHANGELOG.md" pack-output.txt
|
||||
grep "LICENSE" pack-output.txt
|
||||
|
||||
coverage:
|
||||
name: Coverage
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Enable corepack
|
||||
run: corepack enable
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24
|
||||
cache: pnpm
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm run build
|
||||
- name: Coverage
|
||||
run: pnpm run coverage
|
||||
- name: Upload to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
files: ./coverage/lcov.info
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
fail_ci_if_error: false
|
||||
|
|
|
|||
186
README.md
186
README.md
|
|
@ -4,208 +4,64 @@
|
|||
|
||||
# temporal-hijri
|
||||
|
||||
Temporal Calendar Protocol implementation for the Hijri calendar. Works with the TC39 Temporal proposal (Stage 3) and `@js-temporal/polyfill`.
|
||||
Temporal Calendar Protocol implementation for the Hijri calendar. Works with the TC39
|
||||
Temporal proposal (Stage 3) and `@js-temporal/polyfill`.
|
||||
|
||||
Provides `UaqCalendar` (Umm al-Qura) and `FcnaCalendar` (FCNA/ISNA) as plug-in calendars for `Temporal.PlainDate` and related types. The underlying conversion logic comes from [hijri-core](https://github.com/acamarata/hijri-core), a zero-dependency Hijri engine with table-driven UAQ data and astronomical FCNA calculations.
|
||||
|
||||
---
|
||||
Provides `UaqCalendar` (Umm al-Qura) and `FcnaCalendar` (FCNA/ISNA) as plug-in
|
||||
calendars for `Temporal.PlainDate`. The underlying conversion logic comes from
|
||||
[hijri-core](https://github.com/acamarata/hijri-core).
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
pnpm add temporal-hijri hijri-core
|
||||
# Add the polyfill if native Temporal is unavailable:
|
||||
pnpm add @js-temporal/polyfill
|
||||
```
|
||||
|
||||
If you are using the polyfill instead of the native `Temporal` API:
|
||||
|
||||
```bash
|
||||
pnpm add temporal-hijri hijri-core @js-temporal/polyfill
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Quick Start
|
||||
|
||||
```typescript
|
||||
import { Temporal } from '@js-temporal/polyfill'; // or use native Temporal
|
||||
import { Temporal } from '@js-temporal/polyfill';
|
||||
import { uaqCalendar } from 'temporal-hijri';
|
||||
|
||||
// Convert an ISO date to Hijri coordinates
|
||||
const isoDate = Temporal.PlainDate.from('2023-03-23');
|
||||
|
||||
console.log(uaqCalendar.year(isoDate)); // 1444
|
||||
console.log(uaqCalendar.month(isoDate)); // 9 (Ramadan)
|
||||
console.log(uaqCalendar.day(isoDate)); // 1
|
||||
console.log(uaqCalendar.monthCode(isoDate)); // "M09"
|
||||
console.log(uaqCalendar.inLeapYear(isoDate)); // false (1444 is 354 days)
|
||||
|
||||
// Convert Hijri coordinates back to ISO
|
||||
// Convert Hijri coordinates to ISO
|
||||
const ramadan = uaqCalendar.dateFromFields({ year: 1444, month: 9, day: 1 });
|
||||
console.log(ramadan.toString()); // "2023-03-23"
|
||||
|
||||
// Arithmetic in Hijri space
|
||||
// Date arithmetic in Hijri space
|
||||
const { Duration } = Temporal;
|
||||
const nextMonth = uaqCalendar.dateAdd(isoDate, new Duration(0, 1));
|
||||
console.log(uaqCalendar.month(nextMonth)); // 10 (Shawwal)
|
||||
console.log(nextMonth.toString()); // "2023-04-21"
|
||||
```
|
||||
|
||||
---
|
||||
## Calendars
|
||||
|
||||
## Calendar Classes
|
||||
|
||||
### `UaqCalendar`
|
||||
|
||||
Implements the Umm al-Qura calendar, the official calendar of Saudi Arabia. Month boundaries come from pre-calculated tables covering 1318-1500 AH (Gregorian 1900-2076). The most widely used Hijri calendar standard for civil and religious purposes.
|
||||
|
||||
```typescript
|
||||
import { UaqCalendar } from 'temporal-hijri';
|
||||
const cal = new UaqCalendar(); // cal.id === 'hijri-uaq'
|
||||
```
|
||||
|
||||
### `FcnaCalendar`
|
||||
|
||||
Implements the FCNA/ISNA calendar used by the Fiqh Council of North America and the Islamic Society of North America. Month starts are determined by astronomical new moon calculation (Meeus Chapter 49): if conjunction occurs before 12:00 UTC, the month begins the next day; if at or after noon, it begins the day after that.
|
||||
|
||||
```typescript
|
||||
import { FcnaCalendar } from 'temporal-hijri';
|
||||
const cal = new FcnaCalendar(); // cal.id === 'hijri-fcna'
|
||||
```
|
||||
|
||||
### `HijriCalendar` (base class)
|
||||
|
||||
The base implementation. Accepts any `CalendarEngine` from hijri-core. Use this to build a Temporal calendar from a custom engine registered via `hijri-core`'s `registerCalendar()`.
|
||||
|
||||
```typescript
|
||||
import { HijriCalendar } from 'temporal-hijri';
|
||||
import { getCalendar, registerCalendar } from 'hijri-core';
|
||||
|
||||
// Register a custom engine first
|
||||
registerCalendar('my-calendar', myEngine);
|
||||
const cal = new HijriCalendar(getCalendar('my-calendar'));
|
||||
// cal.id === 'hijri-my-calendar'
|
||||
```
|
||||
|
||||
### Convenience singletons
|
||||
|
||||
`uaqCalendar` and `fcnaCalendar` are pre-constructed instances. They are shared objects and safe to reuse across calls.
|
||||
|
||||
```typescript
|
||||
import { uaqCalendar, fcnaCalendar } from 'temporal-hijri';
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## API
|
||||
|
||||
All methods receive a `Temporal.PlainDate` with an ISO (Gregorian) calendar. The PlainDate carries the ISO year/month/day; the calendar object interprets those coordinates.
|
||||
|
||||
| Method | Returns | Description |
|
||||
|---|---|---|
|
||||
| `year(date)` | `number` | Hijri year |
|
||||
| `month(date)` | `number` | Hijri month (1-12) |
|
||||
| `monthCode(date)` | `string` | Month code: `"M01"` through `"M12"` |
|
||||
| `day(date)` | `number` | Day of the Hijri month (1-29 or 1-30) |
|
||||
| `daysInMonth(date)` | `number` | Length of the Hijri month (29 or 30) |
|
||||
| `daysInYear(date)` | `number` | Days in the Hijri year (354 or 355) |
|
||||
| `monthsInYear(date)` | `number` | Always `12` |
|
||||
| `inLeapYear(date)` | `boolean` | `true` if the year has 355 days |
|
||||
| `dayOfWeek(date)` | `number` | ISO weekday: 1=Monday, 7=Sunday |
|
||||
| `dayOfYear(date)` | `number` | Day position within the Hijri year |
|
||||
| `weekOfYear(date)` | `number` | Week position within the Hijri year |
|
||||
| `daysInWeek(date)` | `number` | Always `7` |
|
||||
| `dateFromFields(fields)` | `Temporal.PlainDate` | Construct ISO PlainDate from `{year, month, day}` in Hijri |
|
||||
| `yearMonthFromFields(fields)` | `Temporal.PlainYearMonth` | Construct from `{year, month}` in Hijri |
|
||||
| `monthDayFromFields(fields)` | `Temporal.PlainMonthDay` | Construct from `{month, day}` in Hijri |
|
||||
| `dateAdd(date, duration)` | `Temporal.PlainDate` | Add a duration; years/months applied in Hijri space, days in ISO space |
|
||||
| `dateUntil(one, two, options)` | `Temporal.Duration` | Difference between two dates; supports `largestUnit: 'years'|'months'|'days'|'weeks'` |
|
||||
| `mergeFields(fields, additional)` | `Record` | Merge field objects (Temporal protocol requirement) |
|
||||
| `toString()` | `string` | Calendar identifier (`"hijri-uaq"` or `"hijri-fcna"`) |
|
||||
|
||||
---
|
||||
|
||||
## Calendar Systems
|
||||
|
||||
| System | ID | Authority | Method | Coverage |
|
||||
|---|---|---|---|---|
|
||||
| Umm al-Qura | `hijri-uaq` | KACST / Saudi Arabia | Pre-calculated tables | 1318-1500 AH (1900-2076 CE) |
|
||||
| FCNA/ISNA | `hijri-fcna` | Fiqh Council of North America | Astronomical new moon (Meeus) | Unlimited (calculated) |
|
||||
|
||||
UAQ dates outside 1318-1500 AH throw `RangeError`. FCNA is unbounded but loses precision for very early dates.
|
||||
|
||||
---
|
||||
|
||||
## Custom Calendars
|
||||
|
||||
Any engine registered in hijri-core can be wrapped in a Temporal calendar:
|
||||
|
||||
```typescript
|
||||
import { HijriCalendar } from 'temporal-hijri';
|
||||
import { registerCalendar, getCalendar } from 'hijri-core';
|
||||
import type { CalendarEngine } from 'hijri-core';
|
||||
|
||||
const myEngine: CalendarEngine = {
|
||||
id: 'local-sighting',
|
||||
toHijri(date) { /* ... */ return { hy, hm, hd }; },
|
||||
toGregorian(hy, hm, hd) { /* ... */ return new Date(...); },
|
||||
isValid(hy, hm, hd) { /* ... */ return true; },
|
||||
daysInMonth(hy, hm) { /* ... */ return 29; },
|
||||
};
|
||||
|
||||
registerCalendar('local-sighting', myEngine);
|
||||
const cal = new HijriCalendar(getCalendar('local-sighting'));
|
||||
// cal.id === 'hijri-local-sighting'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## TypeScript
|
||||
|
||||
All types are exported:
|
||||
|
||||
```typescript
|
||||
import type { HijriDate, ConversionOptions, HijriCalendarOptions } from 'temporal-hijri';
|
||||
```
|
||||
|
||||
The package ships dual CJS/ESM builds with full `.d.ts` and `.d.mts` declarations.
|
||||
|
||||
---
|
||||
|
||||
## Architecture
|
||||
|
||||
A thin adapter over [hijri-core](https://github.com/acamarata/hijri-core) that maps the Temporal Calendar Protocol to Hijri calendar engine calls. The `UaqCalendar` and `FcnaCalendar` classes implement `Temporal.CalendarProtocol`: the package itself adds no calendar math.
|
||||
|
||||
For more detail see the [Architecture wiki page](https://github.com/acamarata/temporal-hijri/wiki/Architecture).
|
||||
|
||||
## Compatibility
|
||||
|
||||
- Node.js 20, 22, 24
|
||||
- Any bundler supporting `exports` field (`Vite`, `Webpack 5`, `Rollup`, `esbuild`)
|
||||
- ESM (`import`) and CommonJS (`require`): both provided
|
||||
- No native `Temporal` required: works entirely with `@js-temporal/polyfill`
|
||||
|
||||
---
|
||||
| Calendar | ID | Authority | Method | Coverage |
|
||||
|-------------|--------------|--------------------|--------------------------|------------------|
|
||||
| Umm al-Qura | `hijri-uaq` | KACST, Saudi Arabia | Pre-calculated tables | 1318-1500 AH |
|
||||
| FCNA/ISNA | `hijri-fcna` | Fiqh Council of NA | Astronomical new moon | Unbounded |
|
||||
|
||||
## Documentation
|
||||
|
||||
Full reference, architecture notes, and algorithmic detail in the [wiki](https://github.com/acamarata/temporal-hijri/wiki).
|
||||
Full reference in the [wiki](https://github.com/acamarata/temporal-hijri/wiki).
|
||||
|
||||
---
|
||||
- [API Reference](https://github.com/acamarata/temporal-hijri/wiki/API-Reference)
|
||||
- [Architecture](https://github.com/acamarata/temporal-hijri/wiki/Architecture)
|
||||
- [Examples](https://github.com/acamarata/temporal-hijri/wiki/examples/basic-usage)
|
||||
|
||||
## Related
|
||||
|
||||
- [hijri-core](https://github.com/acamarata/hijri-core): zero-dependency Hijri engine powering this package
|
||||
- [luxon-hijri](https://github.com/acamarata/luxon-hijri): Hijri/Gregorian conversion for Luxon
|
||||
- [hijri-core](https://github.com/acamarata/hijri-core): the underlying calendar engine
|
||||
- [luxon-hijri](https://github.com/acamarata/luxon-hijri): Hijri support for Luxon
|
||||
- [pray-calc](https://github.com/acamarata/pray-calc): Islamic prayer times
|
||||
|
||||
---
|
||||
|
||||
## Acknowledgments
|
||||
|
||||
Calendar data and algorithms provided by [hijri-core](https://github.com/acamarata/hijri-core). The Umm al-Qura table is derived from data published by the King Abdulaziz City for Science and Technology (KACST). FCNA new moon calculations follow Jean Meeus, "Astronomical Algorithms," 2nd ed., Chapter 49.
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
MIT. Copyright (c) 2026 Aric Camarata. See [LICENSE](LICENSE).
|
||||
|
|
|
|||
224
coverage/lcov-report/base.css
Normal file
224
coverage/lcov-report/base.css
Normal file
|
|
@ -0,0 +1,224 @@
|
|||
body, html {
|
||||
margin:0; padding: 0;
|
||||
height: 100%;
|
||||
}
|
||||
body {
|
||||
font-family: Helvetica Neue, Helvetica, Arial;
|
||||
font-size: 14px;
|
||||
color:#333;
|
||||
}
|
||||
.small { font-size: 12px; }
|
||||
*, *:after, *:before {
|
||||
-webkit-box-sizing:border-box;
|
||||
-moz-box-sizing:border-box;
|
||||
box-sizing:border-box;
|
||||
}
|
||||
h1 { font-size: 20px; margin: 0;}
|
||||
h2 { font-size: 14px; }
|
||||
pre {
|
||||
font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-moz-tab-size: 2;
|
||||
-o-tab-size: 2;
|
||||
tab-size: 2;
|
||||
}
|
||||
a { color:#0074D9; text-decoration:none; }
|
||||
a:hover { text-decoration:underline; }
|
||||
.strong { font-weight: bold; }
|
||||
.space-top1 { padding: 10px 0 0 0; }
|
||||
.pad2y { padding: 20px 0; }
|
||||
.pad1y { padding: 10px 0; }
|
||||
.pad2x { padding: 0 20px; }
|
||||
.pad2 { padding: 20px; }
|
||||
.pad1 { padding: 10px; }
|
||||
.space-left2 { padding-left:55px; }
|
||||
.space-right2 { padding-right:20px; }
|
||||
.center { text-align:center; }
|
||||
.clearfix { display:block; }
|
||||
.clearfix:after {
|
||||
content:'';
|
||||
display:block;
|
||||
height:0;
|
||||
clear:both;
|
||||
visibility:hidden;
|
||||
}
|
||||
.fl { float: left; }
|
||||
@media only screen and (max-width:640px) {
|
||||
.col3 { width:100%; max-width:100%; }
|
||||
.hide-mobile { display:none!important; }
|
||||
}
|
||||
|
||||
.quiet {
|
||||
color: #7f7f7f;
|
||||
color: rgba(0,0,0,0.5);
|
||||
}
|
||||
.quiet a { opacity: 0.7; }
|
||||
|
||||
.fraction {
|
||||
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
||||
font-size: 10px;
|
||||
color: #555;
|
||||
background: #E8E8E8;
|
||||
padding: 4px 5px;
|
||||
border-radius: 3px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div.path a:link, div.path a:visited { color: #333; }
|
||||
table.coverage {
|
||||
border-collapse: collapse;
|
||||
margin: 10px 0 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table.coverage td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
table.coverage td.line-count {
|
||||
text-align: right;
|
||||
padding: 0 5px 0 20px;
|
||||
}
|
||||
table.coverage td.line-coverage {
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
min-width:20px;
|
||||
}
|
||||
|
||||
table.coverage td span.cline-any {
|
||||
display: inline-block;
|
||||
padding: 0 5px;
|
||||
width: 100%;
|
||||
}
|
||||
.missing-if-branch {
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
border-radius: 3px;
|
||||
position: relative;
|
||||
padding: 0 4px;
|
||||
background: #333;
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.skip-if-branch {
|
||||
display: none;
|
||||
margin-right: 10px;
|
||||
position: relative;
|
||||
padding: 0 4px;
|
||||
background: #ccc;
|
||||
color: white;
|
||||
}
|
||||
.missing-if-branch .typ, .skip-if-branch .typ {
|
||||
color: inherit !important;
|
||||
}
|
||||
.coverage-summary {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
.coverage-summary tr { border-bottom: 1px solid #bbb; }
|
||||
.keyline-all { border: 1px solid #ddd; }
|
||||
.coverage-summary td, .coverage-summary th { padding: 10px; }
|
||||
.coverage-summary tbody { border: 1px solid #bbb; }
|
||||
.coverage-summary td { border-right: 1px solid #bbb; }
|
||||
.coverage-summary td:last-child { border-right: none; }
|
||||
.coverage-summary th {
|
||||
text-align: left;
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.coverage-summary th.file { border-right: none !important; }
|
||||
.coverage-summary th.pct { }
|
||||
.coverage-summary th.pic,
|
||||
.coverage-summary th.abs,
|
||||
.coverage-summary td.pct,
|
||||
.coverage-summary td.abs { text-align: right; }
|
||||
.coverage-summary td.file { white-space: nowrap; }
|
||||
.coverage-summary td.pic { min-width: 120px !important; }
|
||||
.coverage-summary tfoot td { }
|
||||
|
||||
.coverage-summary .sorter {
|
||||
height: 10px;
|
||||
width: 7px;
|
||||
display: inline-block;
|
||||
margin-left: 0.5em;
|
||||
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
|
||||
}
|
||||
.coverage-summary .sorted .sorter {
|
||||
background-position: 0 -20px;
|
||||
}
|
||||
.coverage-summary .sorted-desc .sorter {
|
||||
background-position: 0 -10px;
|
||||
}
|
||||
.status-line { height: 10px; }
|
||||
/* yellow */
|
||||
.cbranch-no { background: yellow !important; color: #111; }
|
||||
/* dark red */
|
||||
.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
|
||||
.low .chart { border:1px solid #C21F39 }
|
||||
.highlighted,
|
||||
.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
|
||||
background: #C21F39 !important;
|
||||
}
|
||||
/* medium red */
|
||||
.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
|
||||
/* light red */
|
||||
.low, .cline-no { background:#FCE1E5 }
|
||||
/* light green */
|
||||
.high, .cline-yes { background:rgb(230,245,208) }
|
||||
/* medium green */
|
||||
.cstat-yes { background:rgb(161,215,106) }
|
||||
/* dark green */
|
||||
.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
|
||||
.high .chart { border:1px solid rgb(77,146,33) }
|
||||
/* dark yellow (gold) */
|
||||
.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
|
||||
.medium .chart { border:1px solid #f9cd0b; }
|
||||
/* light yellow */
|
||||
.medium { background: #fff4c2; }
|
||||
|
||||
.cstat-skip { background: #ddd; color: #111; }
|
||||
.fstat-skip { background: #ddd; color: #111 !important; }
|
||||
.cbranch-skip { background: #ddd !important; color: #111; }
|
||||
|
||||
span.cline-neutral { background: #eaeaea; }
|
||||
|
||||
.coverage-summary td.empty {
|
||||
opacity: .5;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
line-height: 1;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.cover-fill, .cover-empty {
|
||||
display:inline-block;
|
||||
height: 12px;
|
||||
}
|
||||
.chart {
|
||||
line-height: 0;
|
||||
}
|
||||
.cover-empty {
|
||||
background: white;
|
||||
}
|
||||
.cover-full {
|
||||
border-right: none !important;
|
||||
}
|
||||
pre.prettyprint {
|
||||
border: none !important;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
.com { color: #999 !important; }
|
||||
.ignore-none { color: #999; font-weight: normal; }
|
||||
|
||||
.wrapper {
|
||||
min-height: 100%;
|
||||
height: auto !important;
|
||||
height: 100%;
|
||||
margin: 0 auto -48px;
|
||||
}
|
||||
.footer, .push {
|
||||
height: 48px;
|
||||
}
|
||||
87
coverage/lcov-report/block-navigation.js
Normal file
87
coverage/lcov-report/block-navigation.js
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
/* eslint-disable */
|
||||
var jumpToCode = (function init() {
|
||||
// Classes of code we would like to highlight in the file view
|
||||
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
|
||||
|
||||
// Elements to highlight in the file listing view
|
||||
var fileListingElements = ['td.pct.low'];
|
||||
|
||||
// We don't want to select elements that are direct descendants of another match
|
||||
var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
|
||||
|
||||
// Selector that finds elements on the page to which we can jump
|
||||
var selector =
|
||||
fileListingElements.join(', ') +
|
||||
', ' +
|
||||
notSelector +
|
||||
missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
|
||||
|
||||
// The NodeList of matching elements
|
||||
var missingCoverageElements = document.querySelectorAll(selector);
|
||||
|
||||
var currentIndex;
|
||||
|
||||
function toggleClass(index) {
|
||||
missingCoverageElements
|
||||
.item(currentIndex)
|
||||
.classList.remove('highlighted');
|
||||
missingCoverageElements.item(index).classList.add('highlighted');
|
||||
}
|
||||
|
||||
function makeCurrent(index) {
|
||||
toggleClass(index);
|
||||
currentIndex = index;
|
||||
missingCoverageElements.item(index).scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'center',
|
||||
inline: 'center'
|
||||
});
|
||||
}
|
||||
|
||||
function goToPrevious() {
|
||||
var nextIndex = 0;
|
||||
if (typeof currentIndex !== 'number' || currentIndex === 0) {
|
||||
nextIndex = missingCoverageElements.length - 1;
|
||||
} else if (missingCoverageElements.length > 1) {
|
||||
nextIndex = currentIndex - 1;
|
||||
}
|
||||
|
||||
makeCurrent(nextIndex);
|
||||
}
|
||||
|
||||
function goToNext() {
|
||||
var nextIndex = 0;
|
||||
|
||||
if (
|
||||
typeof currentIndex === 'number' &&
|
||||
currentIndex < missingCoverageElements.length - 1
|
||||
) {
|
||||
nextIndex = currentIndex + 1;
|
||||
}
|
||||
|
||||
makeCurrent(nextIndex);
|
||||
}
|
||||
|
||||
return function jump(event) {
|
||||
if (
|
||||
document.getElementById('fileSearch') === document.activeElement &&
|
||||
document.activeElement != null
|
||||
) {
|
||||
// if we're currently focused on the search input, we don't want to navigate
|
||||
return;
|
||||
}
|
||||
|
||||
switch (event.which) {
|
||||
case 78: // n
|
||||
case 74: // j
|
||||
goToNext();
|
||||
break;
|
||||
case 66: // b
|
||||
case 75: // k
|
||||
case 80: // p
|
||||
goToPrevious();
|
||||
break;
|
||||
}
|
||||
};
|
||||
})();
|
||||
window.addEventListener('keydown', jumpToCode);
|
||||
BIN
coverage/lcov-report/favicon.png
Normal file
BIN
coverage/lcov-report/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 445 B |
131
coverage/lcov-report/index.html
Normal file
131
coverage/lcov-report/index.html
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for All files</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="prettify.css" />
|
||||
<link rel="stylesheet" href="base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1>All files</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">92.9% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>393/423</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">80.35% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>45/56</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">89.28% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>25/28</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">92.9% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>393/423</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
<template id="filterTemplate">
|
||||
<div class="quiet">
|
||||
Filter:
|
||||
<input type="search" id="fileSearch">
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file high" data-value="src"><a href="src/index.html">src</a></td>
|
||||
<td data-value="100" class="pic high">
|
||||
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
||||
</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="12" class="abs high">12/12</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="0" class="abs high">0/0</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="0" class="abs high">0/0</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="12" class="abs high">12/12</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file high" data-value="src/calendars"><a href="src/calendars/index.html">src/calendars</a></td>
|
||||
<td data-value="92.7" class="pic high">
|
||||
<div class="chart"><div class="cover-fill" style="width: 92%"></div><div class="cover-empty" style="width: 8%"></div></div>
|
||||
</td>
|
||||
<td data-value="92.7" class="pct high">92.7%</td>
|
||||
<td data-value="411" class="abs high">381/411</td>
|
||||
<td data-value="80.35" class="pct high">80.35%</td>
|
||||
<td data-value="56" class="abs high">45/56</td>
|
||||
<td data-value="89.28" class="pct high">89.28%</td>
|
||||
<td data-value="28" class="abs high">25/28</td>
|
||||
<td data-value="92.7" class="pct high">92.7%</td>
|
||||
<td data-value="411" class="abs high">381/411</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
||||
at 2026-05-30T19:44:00.925Z
|
||||
</div>
|
||||
<script src="prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="sorter.js"></script>
|
||||
<script src="block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
1
coverage/lcov-report/prettify.css
Normal file
1
coverage/lcov-report/prettify.css
Normal file
|
|
@ -0,0 +1 @@
|
|||
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
|
||||
2
coverage/lcov-report/prettify.js
Normal file
2
coverage/lcov-report/prettify.js
Normal file
File diff suppressed because one or more lines are too long
BIN
coverage/lcov-report/sort-arrow-sprite.png
Normal file
BIN
coverage/lcov-report/sort-arrow-sprite.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 138 B |
210
coverage/lcov-report/sorter.js
Normal file
210
coverage/lcov-report/sorter.js
Normal file
|
|
@ -0,0 +1,210 @@
|
|||
/* eslint-disable */
|
||||
var addSorting = (function() {
|
||||
'use strict';
|
||||
var cols,
|
||||
currentSort = {
|
||||
index: 0,
|
||||
desc: false
|
||||
};
|
||||
|
||||
// returns the summary table element
|
||||
function getTable() {
|
||||
return document.querySelector('.coverage-summary');
|
||||
}
|
||||
// returns the thead element of the summary table
|
||||
function getTableHeader() {
|
||||
return getTable().querySelector('thead tr');
|
||||
}
|
||||
// returns the tbody element of the summary table
|
||||
function getTableBody() {
|
||||
return getTable().querySelector('tbody');
|
||||
}
|
||||
// returns the th element for nth column
|
||||
function getNthColumn(n) {
|
||||
return getTableHeader().querySelectorAll('th')[n];
|
||||
}
|
||||
|
||||
function onFilterInput() {
|
||||
const searchValue = document.getElementById('fileSearch').value;
|
||||
const rows = document.getElementsByTagName('tbody')[0].children;
|
||||
|
||||
// Try to create a RegExp from the searchValue. If it fails (invalid regex),
|
||||
// it will be treated as a plain text search
|
||||
let searchRegex;
|
||||
try {
|
||||
searchRegex = new RegExp(searchValue, 'i'); // 'i' for case-insensitive
|
||||
} catch (error) {
|
||||
searchRegex = null;
|
||||
}
|
||||
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
const row = rows[i];
|
||||
let isMatch = false;
|
||||
|
||||
if (searchRegex) {
|
||||
// If a valid regex was created, use it for matching
|
||||
isMatch = searchRegex.test(row.textContent);
|
||||
} else {
|
||||
// Otherwise, fall back to the original plain text search
|
||||
isMatch = row.textContent
|
||||
.toLowerCase()
|
||||
.includes(searchValue.toLowerCase());
|
||||
}
|
||||
|
||||
row.style.display = isMatch ? '' : 'none';
|
||||
}
|
||||
}
|
||||
|
||||
// loads the search box
|
||||
function addSearchBox() {
|
||||
var template = document.getElementById('filterTemplate');
|
||||
var templateClone = template.content.cloneNode(true);
|
||||
templateClone.getElementById('fileSearch').oninput = onFilterInput;
|
||||
template.parentElement.appendChild(templateClone);
|
||||
}
|
||||
|
||||
// loads all columns
|
||||
function loadColumns() {
|
||||
var colNodes = getTableHeader().querySelectorAll('th'),
|
||||
colNode,
|
||||
cols = [],
|
||||
col,
|
||||
i;
|
||||
|
||||
for (i = 0; i < colNodes.length; i += 1) {
|
||||
colNode = colNodes[i];
|
||||
col = {
|
||||
key: colNode.getAttribute('data-col'),
|
||||
sortable: !colNode.getAttribute('data-nosort'),
|
||||
type: colNode.getAttribute('data-type') || 'string'
|
||||
};
|
||||
cols.push(col);
|
||||
if (col.sortable) {
|
||||
col.defaultDescSort = col.type === 'number';
|
||||
colNode.innerHTML =
|
||||
colNode.innerHTML + '<span class="sorter"></span>';
|
||||
}
|
||||
}
|
||||
return cols;
|
||||
}
|
||||
// attaches a data attribute to every tr element with an object
|
||||
// of data values keyed by column name
|
||||
function loadRowData(tableRow) {
|
||||
var tableCols = tableRow.querySelectorAll('td'),
|
||||
colNode,
|
||||
col,
|
||||
data = {},
|
||||
i,
|
||||
val;
|
||||
for (i = 0; i < tableCols.length; i += 1) {
|
||||
colNode = tableCols[i];
|
||||
col = cols[i];
|
||||
val = colNode.getAttribute('data-value');
|
||||
if (col.type === 'number') {
|
||||
val = Number(val);
|
||||
}
|
||||
data[col.key] = val;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
// loads all row data
|
||||
function loadData() {
|
||||
var rows = getTableBody().querySelectorAll('tr'),
|
||||
i;
|
||||
|
||||
for (i = 0; i < rows.length; i += 1) {
|
||||
rows[i].data = loadRowData(rows[i]);
|
||||
}
|
||||
}
|
||||
// sorts the table using the data for the ith column
|
||||
function sortByIndex(index, desc) {
|
||||
var key = cols[index].key,
|
||||
sorter = function(a, b) {
|
||||
a = a.data[key];
|
||||
b = b.data[key];
|
||||
return a < b ? -1 : a > b ? 1 : 0;
|
||||
},
|
||||
finalSorter = sorter,
|
||||
tableBody = document.querySelector('.coverage-summary tbody'),
|
||||
rowNodes = tableBody.querySelectorAll('tr'),
|
||||
rows = [],
|
||||
i;
|
||||
|
||||
if (desc) {
|
||||
finalSorter = function(a, b) {
|
||||
return -1 * sorter(a, b);
|
||||
};
|
||||
}
|
||||
|
||||
for (i = 0; i < rowNodes.length; i += 1) {
|
||||
rows.push(rowNodes[i]);
|
||||
tableBody.removeChild(rowNodes[i]);
|
||||
}
|
||||
|
||||
rows.sort(finalSorter);
|
||||
|
||||
for (i = 0; i < rows.length; i += 1) {
|
||||
tableBody.appendChild(rows[i]);
|
||||
}
|
||||
}
|
||||
// removes sort indicators for current column being sorted
|
||||
function removeSortIndicators() {
|
||||
var col = getNthColumn(currentSort.index),
|
||||
cls = col.className;
|
||||
|
||||
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
|
||||
col.className = cls;
|
||||
}
|
||||
// adds sort indicators for current column being sorted
|
||||
function addSortIndicators() {
|
||||
getNthColumn(currentSort.index).className += currentSort.desc
|
||||
? ' sorted-desc'
|
||||
: ' sorted';
|
||||
}
|
||||
// adds event listeners for all sorter widgets
|
||||
function enableUI() {
|
||||
var i,
|
||||
el,
|
||||
ithSorter = function ithSorter(i) {
|
||||
var col = cols[i];
|
||||
|
||||
return function() {
|
||||
var desc = col.defaultDescSort;
|
||||
|
||||
if (currentSort.index === i) {
|
||||
desc = !currentSort.desc;
|
||||
}
|
||||
sortByIndex(i, desc);
|
||||
removeSortIndicators();
|
||||
currentSort.index = i;
|
||||
currentSort.desc = desc;
|
||||
addSortIndicators();
|
||||
};
|
||||
};
|
||||
for (i = 0; i < cols.length; i += 1) {
|
||||
if (cols[i].sortable) {
|
||||
// add the click event handler on the th so users
|
||||
// dont have to click on those tiny arrows
|
||||
el = getNthColumn(i).querySelector('.sorter').parentElement;
|
||||
if (el.addEventListener) {
|
||||
el.addEventListener('click', ithSorter(i));
|
||||
} else {
|
||||
el.attachEvent('onclick', ithSorter(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// adds sorting functionality to the UI
|
||||
return function() {
|
||||
if (!getTable()) {
|
||||
return;
|
||||
}
|
||||
cols = loadColumns();
|
||||
loadData();
|
||||
addSearchBox();
|
||||
addSortIndicators();
|
||||
enableUI();
|
||||
};
|
||||
})();
|
||||
|
||||
window.addEventListener('load', addSorting);
|
||||
151
coverage/lcov-report/src/calendars/FcnaCalendar.ts.html
Normal file
151
coverage/lcov-report/src/calendars/FcnaCalendar.ts.html
Normal file
|
|
@ -0,0 +1,151 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for src/calendars/FcnaCalendar.ts</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/calendars</a> FcnaCalendar.ts</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>22/22</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>1/1</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>1/1</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>22/22</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
<template id="filterTemplate">
|
||||
<div class="quiet">
|
||||
Filter:
|
||||
<input type="search" id="fileSearch">
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a>
|
||||
<a name='L9'></a><a href='#L9'>9</a>
|
||||
<a name='L10'></a><a href='#L10'>10</a>
|
||||
<a name='L11'></a><a href='#L11'>11</a>
|
||||
<a name='L12'></a><a href='#L12'>12</a>
|
||||
<a name='L13'></a><a href='#L13'>13</a>
|
||||
<a name='L14'></a><a href='#L14'>14</a>
|
||||
<a name='L15'></a><a href='#L15'>15</a>
|
||||
<a name='L16'></a><a href='#L16'>16</a>
|
||||
<a name='L17'></a><a href='#L17'>17</a>
|
||||
<a name='L18'></a><a href='#L18'>18</a>
|
||||
<a name='L19'></a><a href='#L19'>19</a>
|
||||
<a name='L20'></a><a href='#L20'>20</a>
|
||||
<a name='L21'></a><a href='#L21'>21</a>
|
||||
<a name='L22'></a><a href='#L22'>22</a>
|
||||
<a name='L23'></a><a href='#L23'>23</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">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'));
|
||||
}
|
||||
}
|
||||
</pre></td></tr></table></pre>
|
||||
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
||||
at 2026-05-30T19:44:00.925Z
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
1192
coverage/lcov-report/src/calendars/HijriCalendar.ts.html
Normal file
1192
coverage/lcov-report/src/calendars/HijriCalendar.ts.html
Normal file
File diff suppressed because it is too large
Load diff
145
coverage/lcov-report/src/calendars/UaqCalendar.ts.html
Normal file
145
coverage/lcov-report/src/calendars/UaqCalendar.ts.html
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for src/calendars/UaqCalendar.ts</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/calendars</a> UaqCalendar.ts</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>20/20</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>1/1</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>1/1</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>20/20</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
<template id="filterTemplate">
|
||||
<div class="quiet">
|
||||
Filter:
|
||||
<input type="search" id="fileSearch">
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a>
|
||||
<a name='L9'></a><a href='#L9'>9</a>
|
||||
<a name='L10'></a><a href='#L10'>10</a>
|
||||
<a name='L11'></a><a href='#L11'>11</a>
|
||||
<a name='L12'></a><a href='#L12'>12</a>
|
||||
<a name='L13'></a><a href='#L13'>13</a>
|
||||
<a name='L14'></a><a href='#L14'>14</a>
|
||||
<a name='L15'></a><a href='#L15'>15</a>
|
||||
<a name='L16'></a><a href='#L16'>16</a>
|
||||
<a name='L17'></a><a href='#L17'>17</a>
|
||||
<a name='L18'></a><a href='#L18'>18</a>
|
||||
<a name='L19'></a><a href='#L19'>19</a>
|
||||
<a name='L20'></a><a href='#L20'>20</a>
|
||||
<a name='L21'></a><a href='#L21'>21</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">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'));
|
||||
}
|
||||
}
|
||||
</pre></td></tr></table></pre>
|
||||
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
||||
at 2026-05-30T19:44:00.925Z
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
146
coverage/lcov-report/src/calendars/index.html
Normal file
146
coverage/lcov-report/src/calendars/index.html
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for src/calendars</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> src/calendars</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">92.7% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>381/411</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">80.35% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>45/56</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">89.28% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>25/28</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">92.7% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>381/411</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
<template id="filterTemplate">
|
||||
<div class="quiet">
|
||||
Filter:
|
||||
<input type="search" id="fileSearch">
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file high" data-value="FcnaCalendar.ts"><a href="FcnaCalendar.ts.html">FcnaCalendar.ts</a></td>
|
||||
<td data-value="100" class="pic high">
|
||||
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
||||
</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="22" class="abs high">22/22</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="1" class="abs high">1/1</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="1" class="abs high">1/1</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="22" class="abs high">22/22</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file high" data-value="HijriCalendar.ts"><a href="HijriCalendar.ts.html">HijriCalendar.ts</a></td>
|
||||
<td data-value="91.86" class="pic high">
|
||||
<div class="chart"><div class="cover-fill" style="width: 91%"></div><div class="cover-empty" style="width: 9%"></div></div>
|
||||
</td>
|
||||
<td data-value="91.86" class="pct high">91.86%</td>
|
||||
<td data-value="369" class="abs high">339/369</td>
|
||||
<td data-value="79.62" class="pct medium">79.62%</td>
|
||||
<td data-value="54" class="abs medium">43/54</td>
|
||||
<td data-value="88.46" class="pct high">88.46%</td>
|
||||
<td data-value="26" class="abs high">23/26</td>
|
||||
<td data-value="91.86" class="pct high">91.86%</td>
|
||||
<td data-value="369" class="abs high">339/369</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file high" data-value="UaqCalendar.ts"><a href="UaqCalendar.ts.html">UaqCalendar.ts</a></td>
|
||||
<td data-value="100" class="pic high">
|
||||
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
||||
</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="20" class="abs high">20/20</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="1" class="abs high">1/1</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="1" class="abs high">1/1</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="20" class="abs high">20/20</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
||||
at 2026-05-30T19:44:00.925Z
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
116
coverage/lcov-report/src/index.html
Normal file
116
coverage/lcov-report/src/index.html
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for src</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../prettify.css" />
|
||||
<link rel="stylesheet" href="../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../index.html">All files</a> src</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>12/12</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>0/0</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>0/0</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>12/12</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
<template id="filterTemplate">
|
||||
<div class="quiet">
|
||||
Filter:
|
||||
<input type="search" id="fileSearch">
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file high" data-value="index.ts"><a href="index.ts.html">index.ts</a></td>
|
||||
<td data-value="100" class="pic high">
|
||||
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
||||
</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="12" class="abs high">12/12</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="0" class="abs high">0/0</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="0" class="abs high">0/0</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="12" class="abs high">12/12</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
||||
at 2026-05-30T19:44:00.925Z
|
||||
</div>
|
||||
<script src="../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../sorter.js"></script>
|
||||
<script src="../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
121
coverage/lcov-report/src/index.ts.html
Normal file
121
coverage/lcov-report/src/index.ts.html
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for src/index.ts</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../prettify.css" />
|
||||
<link rel="stylesheet" href="../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../index.html">All files</a> / <a href="index.html">src</a> index.ts</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>12/12</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>0/0</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>0/0</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>12/12</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
<template id="filterTemplate">
|
||||
<div class="quiet">
|
||||
Filter:
|
||||
<input type="search" id="fileSearch">
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a>
|
||||
<a name='L9'></a><a href='#L9'>9</a>
|
||||
<a name='L10'></a><a href='#L10'>10</a>
|
||||
<a name='L11'></a><a href='#L11'>11</a>
|
||||
<a name='L12'></a><a href='#L12'>12</a>
|
||||
<a name='L13'></a><a href='#L13'>13</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">export { HijriCalendar } from './calendars/HijriCalendar';
|
||||
export { UaqCalendar } from './calendars/UaqCalendar';
|
||||
export { FcnaCalendar } from './calendars/FcnaCalendar';
|
||||
|
||||
export type { HijriDate, CalendarEngine, ConversionOptions } from 'hijri-core';
|
||||
|
||||
// Pre-built singletons. Import and use directly; no need to instantiate.
|
||||
import { UaqCalendar } from './calendars/UaqCalendar';
|
||||
import { FcnaCalendar } from './calendars/FcnaCalendar';
|
||||
|
||||
export const uaqCalendar = new UaqCalendar();
|
||||
export const fcnaCalendar = new FcnaCalendar();
|
||||
</pre></td></tr></table></pre>
|
||||
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
||||
at 2026-05-30T19:44:00.925Z
|
||||
</div>
|
||||
<script src="../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../sorter.js"></script>
|
||||
<script src="../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
571
coverage/lcov.info
Normal file
571
coverage/lcov.info
Normal file
|
|
@ -0,0 +1,571 @@
|
|||
TN:
|
||||
SF:src/index.ts
|
||||
FNF:0
|
||||
FNH:0
|
||||
DA:1,1
|
||||
DA:2,1
|
||||
DA:3,1
|
||||
DA:4,1
|
||||
DA:5,1
|
||||
DA:6,1
|
||||
DA:7,1
|
||||
DA:8,1
|
||||
DA:9,1
|
||||
DA:10,1
|
||||
DA:11,1
|
||||
DA:12,1
|
||||
LF:12
|
||||
LH:12
|
||||
BRF:0
|
||||
BRH:0
|
||||
end_of_record
|
||||
TN:
|
||||
SF:src/calendars/FcnaCalendar.ts
|
||||
FN:19,FcnaCalendar
|
||||
FNF:1
|
||||
FNH:1
|
||||
FNDA:2,FcnaCalendar
|
||||
DA:1,1
|
||||
DA:2,1
|
||||
DA:3,1
|
||||
DA:4,1
|
||||
DA:5,1
|
||||
DA:6,1
|
||||
DA:7,1
|
||||
DA:8,1
|
||||
DA:9,1
|
||||
DA:10,1
|
||||
DA:11,1
|
||||
DA:12,1
|
||||
DA:13,1
|
||||
DA:14,1
|
||||
DA:15,1
|
||||
DA:16,1
|
||||
DA:17,1
|
||||
DA:18,1
|
||||
DA:19,1
|
||||
DA:20,2
|
||||
DA:21,2
|
||||
DA:22,1
|
||||
LF:22
|
||||
LH:22
|
||||
BRDA:19,0,0,2
|
||||
BRF:1
|
||||
BRH:1
|
||||
end_of_record
|
||||
TN:
|
||||
SF:src/calendars/HijriCalendar.ts
|
||||
FN:15,borrowHijriDiff
|
||||
FN:61,HijriCalendar
|
||||
FN:66,toString
|
||||
FN:79,toHijri
|
||||
FN:94,fromHijri
|
||||
FN:112,resolveOverflow
|
||||
FN:119,applyOverflow
|
||||
FN:133,year
|
||||
FN:137,month
|
||||
FN:146,monthCode
|
||||
FN:151,day
|
||||
FN:157,daysInMonth
|
||||
FN:166,daysInYear
|
||||
FN:175,monthsInYear
|
||||
FN:179,inLeapYear
|
||||
FN:190,dayOfWeek
|
||||
FN:198,dayOfYear
|
||||
FN:208,weekOfYear
|
||||
FN:212,daysInWeek
|
||||
FN:222,fields
|
||||
FN:228,dateFromFields
|
||||
FN:243,yearMonthFromFields
|
||||
FN:266,monthDayFromFields
|
||||
FN:295,dateAdd
|
||||
FN:333,dateUntil
|
||||
FN:363,mergeFields
|
||||
FNF:26
|
||||
FNH:23
|
||||
FNDA:2,borrowHijriDiff
|
||||
FNDA:4,HijriCalendar
|
||||
FNDA:0,toString
|
||||
FNDA:30,toHijri
|
||||
FNDA:13,fromHijri
|
||||
FNDA:10,resolveOverflow
|
||||
FNDA:9,applyOverflow
|
||||
FNDA:5,year
|
||||
FNDA:7,month
|
||||
FNDA:1,monthCode
|
||||
FNDA:4,day
|
||||
FNDA:1,daysInMonth
|
||||
FNDA:2,daysInYear
|
||||
FNDA:1,monthsInYear
|
||||
FNDA:2,inLeapYear
|
||||
FNDA:1,dayOfWeek
|
||||
FNDA:1,dayOfYear
|
||||
FNDA:0,weekOfYear
|
||||
FNDA:1,daysInWeek
|
||||
FNDA:2,fields
|
||||
FNDA:5,dateFromFields
|
||||
FNDA:1,yearMonthFromFields
|
||||
FNDA:4,monthDayFromFields
|
||||
FNDA:5,dateAdd
|
||||
FNDA:4,dateUntil
|
||||
FNDA:0,mergeFields
|
||||
DA:1,1
|
||||
DA:2,1
|
||||
DA:3,1
|
||||
DA:4,1
|
||||
DA:5,1
|
||||
DA:6,1
|
||||
DA:7,1
|
||||
DA:8,1
|
||||
DA:9,1
|
||||
DA:10,1
|
||||
DA:11,1
|
||||
DA:12,1
|
||||
DA:13,1
|
||||
DA:14,1
|
||||
DA:15,2
|
||||
DA:16,2
|
||||
DA:17,2
|
||||
DA:18,2
|
||||
DA:19,2
|
||||
DA:20,2
|
||||
DA:21,2
|
||||
DA:22,2
|
||||
DA:23,2
|
||||
DA:24,0
|
||||
DA:25,0
|
||||
DA:26,0
|
||||
DA:27,0
|
||||
DA:28,0
|
||||
DA:29,0
|
||||
DA:30,0
|
||||
DA:31,0
|
||||
DA:32,0
|
||||
DA:33,2
|
||||
DA:34,2
|
||||
DA:35,2
|
||||
DA:36,0
|
||||
DA:37,0
|
||||
DA:38,0
|
||||
DA:39,2
|
||||
DA:40,2
|
||||
DA:41,2
|
||||
DA:42,1
|
||||
DA:43,1
|
||||
DA:44,1
|
||||
DA:45,1
|
||||
DA:46,1
|
||||
DA:47,1
|
||||
DA:48,1
|
||||
DA:49,1
|
||||
DA:50,1
|
||||
DA:51,1
|
||||
DA:52,1
|
||||
DA:53,1
|
||||
DA:54,1
|
||||
DA:55,1
|
||||
DA:56,1
|
||||
DA:57,1
|
||||
DA:58,1
|
||||
DA:59,1
|
||||
DA:60,1
|
||||
DA:61,1
|
||||
DA:62,4
|
||||
DA:63,4
|
||||
DA:64,4
|
||||
DA:65,1
|
||||
DA:66,1
|
||||
DA:67,0
|
||||
DA:68,0
|
||||
DA:69,1
|
||||
DA:70,1
|
||||
DA:71,1
|
||||
DA:72,1
|
||||
DA:73,1
|
||||
DA:74,1
|
||||
DA:75,1
|
||||
DA:76,1
|
||||
DA:77,1
|
||||
DA:78,1
|
||||
DA:79,1
|
||||
DA:80,30
|
||||
DA:81,30
|
||||
DA:82,30
|
||||
DA:83,1
|
||||
DA:84,1
|
||||
DA:85,29
|
||||
DA:86,30
|
||||
DA:87,1
|
||||
DA:88,1
|
||||
DA:89,1
|
||||
DA:90,1
|
||||
DA:91,1
|
||||
DA:92,1
|
||||
DA:93,1
|
||||
DA:94,1
|
||||
DA:95,13
|
||||
DA:96,13
|
||||
DA:97,0
|
||||
DA:98,0
|
||||
DA:99,0
|
||||
DA:100,0
|
||||
DA:101,13
|
||||
DA:102,13
|
||||
DA:103,13
|
||||
DA:104,13
|
||||
DA:105,13
|
||||
DA:106,13
|
||||
DA:107,1
|
||||
DA:108,1
|
||||
DA:109,1
|
||||
DA:110,1
|
||||
DA:111,1
|
||||
DA:112,1
|
||||
DA:113,10
|
||||
DA:114,10
|
||||
DA:115,1
|
||||
DA:116,1
|
||||
DA:117,1
|
||||
DA:118,1
|
||||
DA:119,1
|
||||
DA:120,9
|
||||
DA:121,9
|
||||
DA:122,9
|
||||
DA:123,9
|
||||
DA:124,9
|
||||
DA:125,9
|
||||
DA:126,2
|
||||
DA:127,2
|
||||
DA:128,7
|
||||
DA:129,9
|
||||
DA:130,1
|
||||
DA:131,1
|
||||
DA:132,1
|
||||
DA:133,1
|
||||
DA:134,5
|
||||
DA:135,5
|
||||
DA:136,1
|
||||
DA:137,1
|
||||
DA:138,7
|
||||
DA:139,7
|
||||
DA:140,1
|
||||
DA:141,1
|
||||
DA:142,1
|
||||
DA:143,1
|
||||
DA:144,1
|
||||
DA:145,1
|
||||
DA:146,1
|
||||
DA:147,1
|
||||
DA:148,1
|
||||
DA:149,1
|
||||
DA:150,1
|
||||
DA:151,1
|
||||
DA:152,4
|
||||
DA:153,4
|
||||
DA:154,1
|
||||
DA:155,1
|
||||
DA:156,1
|
||||
DA:157,1
|
||||
DA:158,1
|
||||
DA:159,1
|
||||
DA:160,1
|
||||
DA:161,1
|
||||
DA:162,1
|
||||
DA:163,1
|
||||
DA:164,1
|
||||
DA:165,1
|
||||
DA:166,1
|
||||
DA:167,2
|
||||
DA:168,2
|
||||
DA:169,2
|
||||
DA:170,24
|
||||
DA:171,24
|
||||
DA:172,2
|
||||
DA:173,2
|
||||
DA:174,1
|
||||
DA:175,1
|
||||
DA:176,1
|
||||
DA:177,1
|
||||
DA:178,1
|
||||
DA:179,1
|
||||
DA:180,2
|
||||
DA:181,2
|
||||
DA:182,1
|
||||
DA:183,1
|
||||
DA:184,1
|
||||
DA:185,1
|
||||
DA:186,1
|
||||
DA:187,1
|
||||
DA:188,1
|
||||
DA:189,1
|
||||
DA:190,1
|
||||
DA:191,1
|
||||
DA:192,1
|
||||
DA:193,1
|
||||
DA:194,1
|
||||
DA:195,1
|
||||
DA:196,1
|
||||
DA:197,1
|
||||
DA:198,1
|
||||
DA:199,1
|
||||
DA:200,1
|
||||
DA:201,1
|
||||
DA:202,8
|
||||
DA:203,8
|
||||
DA:204,1
|
||||
DA:205,1
|
||||
DA:206,1
|
||||
DA:207,1
|
||||
DA:208,1
|
||||
DA:209,0
|
||||
DA:210,0
|
||||
DA:211,1
|
||||
DA:212,1
|
||||
DA:213,1
|
||||
DA:214,1
|
||||
DA:215,1
|
||||
DA:216,1
|
||||
DA:217,1
|
||||
DA:218,1
|
||||
DA:219,1
|
||||
DA:220,1
|
||||
DA:221,1
|
||||
DA:222,1
|
||||
DA:223,2
|
||||
DA:224,2
|
||||
DA:225,1
|
||||
DA:226,1
|
||||
DA:227,1
|
||||
DA:228,1
|
||||
DA:229,5
|
||||
DA:230,5
|
||||
DA:231,5
|
||||
DA:232,5
|
||||
DA:233,5
|
||||
DA:234,5
|
||||
DA:235,5
|
||||
DA:236,5
|
||||
DA:237,1
|
||||
DA:238,1
|
||||
DA:239,1
|
||||
DA:240,1
|
||||
DA:241,1
|
||||
DA:242,1
|
||||
DA:243,1
|
||||
DA:244,1
|
||||
DA:245,1
|
||||
DA:246,1
|
||||
DA:247,1
|
||||
DA:248,1
|
||||
DA:249,1
|
||||
DA:250,1
|
||||
DA:251,0
|
||||
DA:252,0
|
||||
DA:253,1
|
||||
DA:254,1
|
||||
DA:255,1
|
||||
DA:256,1
|
||||
DA:257,1
|
||||
DA:258,1
|
||||
DA:259,1
|
||||
DA:260,1
|
||||
DA:261,1
|
||||
DA:262,1
|
||||
DA:263,1
|
||||
DA:264,1
|
||||
DA:265,1
|
||||
DA:266,1
|
||||
DA:267,4
|
||||
DA:268,4
|
||||
DA:269,4
|
||||
DA:270,4
|
||||
DA:271,4
|
||||
DA:272,4
|
||||
DA:273,4
|
||||
DA:274,4
|
||||
DA:275,4
|
||||
DA:276,4
|
||||
DA:277,4
|
||||
DA:278,4
|
||||
DA:279,4
|
||||
DA:280,1
|
||||
DA:281,1
|
||||
DA:282,1
|
||||
DA:283,1
|
||||
DA:284,1
|
||||
DA:285,1
|
||||
DA:286,1
|
||||
DA:287,1
|
||||
DA:288,1
|
||||
DA:289,1
|
||||
DA:290,1
|
||||
DA:291,1
|
||||
DA:292,1
|
||||
DA:293,1
|
||||
DA:294,1
|
||||
DA:295,1
|
||||
DA:296,5
|
||||
DA:297,5
|
||||
DA:298,5
|
||||
DA:299,5
|
||||
DA:300,5
|
||||
DA:301,5
|
||||
DA:302,5
|
||||
DA:303,5
|
||||
DA:304,5
|
||||
DA:305,5
|
||||
DA:306,5
|
||||
DA:307,5
|
||||
DA:308,5
|
||||
DA:309,5
|
||||
DA:310,5
|
||||
DA:311,5
|
||||
DA:312,0
|
||||
DA:313,0
|
||||
DA:314,0
|
||||
DA:315,5
|
||||
DA:316,5
|
||||
DA:317,5
|
||||
DA:318,5
|
||||
DA:319,5
|
||||
DA:320,5
|
||||
DA:321,5
|
||||
DA:322,5
|
||||
DA:323,5
|
||||
DA:324,5
|
||||
DA:325,1
|
||||
DA:326,1
|
||||
DA:327,1
|
||||
DA:328,1
|
||||
DA:329,1
|
||||
DA:330,1
|
||||
DA:331,1
|
||||
DA:332,1
|
||||
DA:333,1
|
||||
DA:334,4
|
||||
DA:335,4
|
||||
DA:336,4
|
||||
DA:337,4
|
||||
DA:338,4
|
||||
DA:339,4
|
||||
DA:340,4
|
||||
DA:341,1
|
||||
DA:342,1
|
||||
DA:343,1
|
||||
DA:344,1
|
||||
DA:345,1
|
||||
DA:346,3
|
||||
DA:347,4
|
||||
DA:348,1
|
||||
DA:349,1
|
||||
DA:350,1
|
||||
DA:351,1
|
||||
DA:352,1
|
||||
DA:353,1
|
||||
DA:354,2
|
||||
DA:355,2
|
||||
DA:356,4
|
||||
DA:357,1
|
||||
DA:358,1
|
||||
DA:359,1
|
||||
DA:360,1
|
||||
DA:361,4
|
||||
DA:362,1
|
||||
DA:363,1
|
||||
DA:364,0
|
||||
DA:365,0
|
||||
DA:366,0
|
||||
DA:367,0
|
||||
DA:368,0
|
||||
DA:369,1
|
||||
LF:369
|
||||
LH:339
|
||||
BRDA:15,0,0,2
|
||||
BRDA:23,1,0,0
|
||||
BRDA:35,2,0,0
|
||||
BRDA:61,3,0,4
|
||||
BRDA:79,4,0,30
|
||||
BRDA:82,5,0,1
|
||||
BRDA:84,6,0,29
|
||||
BRDA:94,7,0,13
|
||||
BRDA:96,8,0,0
|
||||
BRDA:112,9,0,10
|
||||
BRDA:113,10,0,4
|
||||
BRDA:113,11,0,6
|
||||
BRDA:119,12,0,9
|
||||
BRDA:125,13,0,2
|
||||
BRDA:125,14,0,2
|
||||
BRDA:127,15,0,7
|
||||
BRDA:133,16,0,5
|
||||
BRDA:137,17,0,7
|
||||
BRDA:146,18,0,1
|
||||
BRDA:151,19,0,4
|
||||
BRDA:157,20,0,1
|
||||
BRDA:166,21,0,2
|
||||
BRDA:169,22,0,24
|
||||
BRDA:175,23,0,1
|
||||
BRDA:179,24,0,2
|
||||
BRDA:190,25,0,1
|
||||
BRDA:198,26,0,1
|
||||
BRDA:201,27,0,8
|
||||
BRDA:212,28,0,1
|
||||
BRDA:222,29,0,2
|
||||
BRDA:228,30,0,5
|
||||
BRDA:243,31,0,1
|
||||
BRDA:250,32,0,0
|
||||
BRDA:250,33,0,0
|
||||
BRDA:266,34,0,4
|
||||
BRDA:271,35,0,3
|
||||
BRDA:295,36,0,5
|
||||
BRDA:302,37,0,0
|
||||
BRDA:303,38,0,0
|
||||
BRDA:311,39,0,0
|
||||
BRDA:322,40,0,0
|
||||
BRDA:322,41,0,0
|
||||
BRDA:323,42,0,2
|
||||
BRDA:323,43,0,3
|
||||
BRDA:333,44,0,4
|
||||
BRDA:338,45,0,0
|
||||
BRDA:340,46,0,3
|
||||
BRDA:340,47,0,1
|
||||
BRDA:345,48,0,3
|
||||
BRDA:347,49,0,2
|
||||
BRDA:347,50,0,1
|
||||
BRDA:353,51,0,2
|
||||
BRDA:356,52,0,1
|
||||
BRDA:356,53,0,1
|
||||
BRF:54
|
||||
BRH:43
|
||||
end_of_record
|
||||
TN:
|
||||
SF:src/calendars/UaqCalendar.ts
|
||||
FN:17,UaqCalendar
|
||||
FNF:1
|
||||
FNH:1
|
||||
FNDA:2,UaqCalendar
|
||||
DA:1,1
|
||||
DA:2,1
|
||||
DA:3,1
|
||||
DA:4,1
|
||||
DA:5,1
|
||||
DA:6,1
|
||||
DA:7,1
|
||||
DA:8,1
|
||||
DA:9,1
|
||||
DA:10,1
|
||||
DA:11,1
|
||||
DA:12,1
|
||||
DA:13,1
|
||||
DA:14,1
|
||||
DA:15,1
|
||||
DA:16,1
|
||||
DA:17,1
|
||||
DA:18,2
|
||||
DA:19,2
|
||||
DA:20,1
|
||||
LF:20
|
||||
LH:20
|
||||
BRDA:17,0,0,2
|
||||
BRF:1
|
||||
BRH:1
|
||||
end_of_record
|
||||
1
coverage/tmp/coverage-50816-1780170240883-0.json
Normal file
1
coverage/tmp/coverage-50816-1780170240883-0.json
Normal file
File diff suppressed because one or more lines are too long
1
coverage/tmp/coverage-50817-1780170240859-0.json
Normal file
1
coverage/tmp/coverage-50817-1780170240859-0.json
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -130,10 +130,22 @@ export class HijriCalendar {
|
|||
|
||||
// ── Field accessors ───────────────────────────────────────────────────────
|
||||
|
||||
/**
|
||||
* Returns the Hijri year for the given ISO date.
|
||||
*
|
||||
* @param date - A Temporal.PlainDate with ISO (Gregorian) coordinates.
|
||||
* @returns The Hijri year, e.g. 1444.
|
||||
*/
|
||||
year(date: Temporal.PlainDate): number {
|
||||
return this.toHijri(date).hy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Hijri month (1-12) for the given ISO date.
|
||||
*
|
||||
* @param date - A Temporal.PlainDate with ISO (Gregorian) coordinates.
|
||||
* @returns Month number 1 (Muharram) through 12 (Dhul-Hijja).
|
||||
*/
|
||||
month(date: Temporal.PlainDate): number {
|
||||
return this.toHijri(date).hm;
|
||||
}
|
||||
|
|
@ -148,12 +160,27 @@ export class HijriCalendar {
|
|||
return `M${String(hm).padStart(2, '0')}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the day of the Hijri month (1-29 or 1-30).
|
||||
*
|
||||
* @param date - A Temporal.PlainDate with ISO (Gregorian) coordinates.
|
||||
* @returns Day of month within the Hijri calendar.
|
||||
*/
|
||||
day(date: Temporal.PlainDate): number {
|
||||
return this.toHijri(date).hd;
|
||||
}
|
||||
|
||||
// ── Month and year metrics ─────────────────────────────────────────────────
|
||||
|
||||
/**
|
||||
* Returns the number of days in the Hijri month containing the given date.
|
||||
*
|
||||
* Hijri months alternate between 29 and 30 days, but the exact pattern
|
||||
* differs by calendar system (UAQ uses fixed tables; FCNA uses calculation).
|
||||
*
|
||||
* @param date - A Temporal.PlainDate with ISO (Gregorian) coordinates.
|
||||
* @returns 29 or 30.
|
||||
*/
|
||||
daysInMonth(date: Temporal.PlainDate): number {
|
||||
const { hy, hm } = this.toHijri(date);
|
||||
return this.engine.daysInMonth(hy, hm);
|
||||
|
|
@ -172,10 +199,27 @@ export class HijriCalendar {
|
|||
return total;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of months in the Hijri year.
|
||||
*
|
||||
* Always 12. Unlike the Hebrew calendar, the Hijri lunar calendar has no
|
||||
* intercalary (leap) month — only a possible extra day in Dhul-Hijja.
|
||||
*
|
||||
* @returns Always 12.
|
||||
*/
|
||||
monthsInYear(_date: Temporal.PlainDate): number {
|
||||
return 12;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the Hijri year is a leap year (355 days).
|
||||
*
|
||||
* Standard Hijri years have 354 days. A leap year adds one day to
|
||||
* Dhul-Hijja (month 12), making it 355 days total.
|
||||
*
|
||||
* @param date - A Temporal.PlainDate with ISO (Gregorian) coordinates.
|
||||
* @returns `true` if the year has 355 days.
|
||||
*/
|
||||
inLeapYear(date: Temporal.PlainDate): boolean {
|
||||
return this.daysInYear(date) === 355;
|
||||
}
|
||||
|
|
@ -209,6 +253,13 @@ export class HijriCalendar {
|
|||
return Math.ceil(this.dayOfYear(date) / 7);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of days in a week.
|
||||
*
|
||||
* Always 7. Required by the Temporal Calendar Protocol.
|
||||
*
|
||||
* @returns Always 7.
|
||||
*/
|
||||
daysInWeek(_date: Temporal.PlainDate): number {
|
||||
return 7;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue