@timestamp-js/calendar-islamic 0.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +46 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +113 -0
- package/dist/index.js.map +1 -0
- package/package.json +69 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jeff Galbraith
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# @timestamp-js/calendar-islamic
|
|
2
|
+
|
|
3
|
+
Islamic/Hijri calendar adapters for `@timestamp-js/core`.
|
|
4
|
+
|
|
5
|
+
The initial adapter is `islamicCivilCalendar`, a deterministic tabular Islamic civil/Hijri calendar.
|
|
6
|
+
It does not model observational Hijri calendars or Umm al-Qura adjustments.
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
import {
|
|
10
|
+
createCalendarDayList,
|
|
11
|
+
getCalendarEndOfMonth,
|
|
12
|
+
getCalendarEndOfWeek,
|
|
13
|
+
getCalendarStartOfMonth,
|
|
14
|
+
getCalendarStartOfWeek,
|
|
15
|
+
gregorianCalendar,
|
|
16
|
+
parseCalendarTimestamp,
|
|
17
|
+
} from '@timestamp-js/core'
|
|
18
|
+
import { islamicCivilCalendar } from '@timestamp-js/calendar-islamic'
|
|
19
|
+
|
|
20
|
+
const ramadan = { year: 1445, month: 9, day: 1 }
|
|
21
|
+
const gregorian = gregorianCalendar.fromEpochDay(islamicCivilCalendar.toEpochDay(ramadan))
|
|
22
|
+
|
|
23
|
+
gregorian // { year: 2024, month: 3, day: 11 }
|
|
24
|
+
|
|
25
|
+
const visible = parseCalendarTimestamp('1445-09-15', islamicCivilCalendar)!
|
|
26
|
+
const weekdays = [0, 1, 2, 3, 4, 5, 6]
|
|
27
|
+
|
|
28
|
+
const weekStart = getCalendarStartOfWeek(visible, weekdays, islamicCivilCalendar)
|
|
29
|
+
const weekEnd = getCalendarEndOfWeek(visible, weekdays, islamicCivilCalendar)
|
|
30
|
+
const weekDays = createCalendarDayList(weekStart, weekEnd, visible, islamicCivilCalendar)
|
|
31
|
+
|
|
32
|
+
weekStart.date // '1445-09-14'
|
|
33
|
+
weekEnd.date // '1445-09-20'
|
|
34
|
+
weekDays.length // 7
|
|
35
|
+
|
|
36
|
+
const monthStart = getCalendarStartOfMonth(visible, islamicCivilCalendar)
|
|
37
|
+
const monthEnd = getCalendarEndOfMonth(visible, islamicCivilCalendar)
|
|
38
|
+
const monthDays = createCalendarDayList(monthStart, monthEnd, visible, islamicCivilCalendar)
|
|
39
|
+
|
|
40
|
+
monthStart.date // '1445-09-01'
|
|
41
|
+
monthEnd.date // '1445-09-30'
|
|
42
|
+
monthDays.length // 30
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
This package is early calendar-adapter work. Treat the adapter contract as release-candidate API
|
|
46
|
+
until `@timestamp-js/core` reaches a stable `1.0.0`.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { CalendarSystem } from '@timestamp-js/core';
|
|
2
|
+
/**
|
|
3
|
+
* Returns true when a tabular Islamic civil year is a leap year.
|
|
4
|
+
*
|
|
5
|
+
* @param year Islamic civil year number.
|
|
6
|
+
* @returns True when the year contains a leap day in Dhu al-Hijjah.
|
|
7
|
+
* @category calendar
|
|
8
|
+
*/
|
|
9
|
+
export declare function isIslamicCivilLeapYear(year: number): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Returns days in a tabular Islamic civil month.
|
|
12
|
+
*
|
|
13
|
+
* @param year Islamic civil year number.
|
|
14
|
+
* @param month Islamic civil month number, where Muharram is `1`.
|
|
15
|
+
* @returns Number of days in the month, or `0` for an invalid month number.
|
|
16
|
+
* @category calendar
|
|
17
|
+
*/
|
|
18
|
+
export declare function islamicCivilDaysInMonth(year: number, month: number): number;
|
|
19
|
+
/**
|
|
20
|
+
* Deterministic tabular Islamic civil calendar.
|
|
21
|
+
*
|
|
22
|
+
* This adapter intentionally models the arithmetic/civil Hijri calendar. It
|
|
23
|
+
* does not model observational calendars or Umm al-Qura adjustments.
|
|
24
|
+
*/
|
|
25
|
+
export declare const islamicCivilCalendar: CalendarSystem;
|
|
26
|
+
/**
|
|
27
|
+
* Alias for the default Islamic adapter exported by this package.
|
|
28
|
+
*/
|
|
29
|
+
export declare const islamicCalendar: CalendarSystem;
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAoB3E;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAG5D;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAY3E;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,cA0EjC,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,gBAAuB,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { gregorianCalendar } from '@timestamp-js/core';
|
|
2
|
+
const ISLAMIC_EPOCH_DAY = gregorianCalendar.toEpochDay({ year: 622, month: 7, day: 19 });
|
|
3
|
+
const MONTHS_IN_YEAR = 12;
|
|
4
|
+
function assertPositiveYear(year) {
|
|
5
|
+
if (year < 1) {
|
|
6
|
+
throw new RangeError('Islamic calendar years start at 1 AH.');
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
function daysBeforeYear(year) {
|
|
10
|
+
assertPositiveYear(year);
|
|
11
|
+
return (year - 1) * 354 + Math.floor((3 + 11 * year) / 30);
|
|
12
|
+
}
|
|
13
|
+
function daysBeforeMonth(month) {
|
|
14
|
+
return Math.ceil(29.5 * (month - 1));
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns true when a tabular Islamic civil year is a leap year.
|
|
18
|
+
*
|
|
19
|
+
* @param year Islamic civil year number.
|
|
20
|
+
* @returns True when the year contains a leap day in Dhu al-Hijjah.
|
|
21
|
+
* @category calendar
|
|
22
|
+
*/
|
|
23
|
+
export function isIslamicCivilLeapYear(year) {
|
|
24
|
+
assertPositiveYear(year);
|
|
25
|
+
return (11 * year + 14) % 30 < 11;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Returns days in a tabular Islamic civil month.
|
|
29
|
+
*
|
|
30
|
+
* @param year Islamic civil year number.
|
|
31
|
+
* @param month Islamic civil month number, where Muharram is `1`.
|
|
32
|
+
* @returns Number of days in the month, or `0` for an invalid month number.
|
|
33
|
+
* @category calendar
|
|
34
|
+
*/
|
|
35
|
+
export function islamicCivilDaysInMonth(year, month) {
|
|
36
|
+
assertPositiveYear(year);
|
|
37
|
+
if (month < 1 || month > MONTHS_IN_YEAR) {
|
|
38
|
+
return 0;
|
|
39
|
+
}
|
|
40
|
+
if (month === 12 && isIslamicCivilLeapYear(year) === true) {
|
|
41
|
+
return 30;
|
|
42
|
+
}
|
|
43
|
+
return month % 2 === 1 ? 30 : 29;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Deterministic tabular Islamic civil calendar.
|
|
47
|
+
*
|
|
48
|
+
* This adapter intentionally models the arithmetic/civil Hijri calendar. It
|
|
49
|
+
* does not model observational calendars or Umm al-Qura adjustments.
|
|
50
|
+
*/
|
|
51
|
+
export const islamicCivilCalendar = Object.freeze({
|
|
52
|
+
id: 'islamic-civil',
|
|
53
|
+
intlCalendar: 'islamic-civil',
|
|
54
|
+
label: 'Islamic Civil',
|
|
55
|
+
monthsInYear() {
|
|
56
|
+
return MONTHS_IN_YEAR;
|
|
57
|
+
},
|
|
58
|
+
isLeapYear(year) {
|
|
59
|
+
return isIslamicCivilLeapYear(year);
|
|
60
|
+
},
|
|
61
|
+
daysInMonth(year, month) {
|
|
62
|
+
return islamicCivilDaysInMonth(year, month);
|
|
63
|
+
},
|
|
64
|
+
toEpochDay(date) {
|
|
65
|
+
assertPositiveYear(date.year);
|
|
66
|
+
return (ISLAMIC_EPOCH_DAY + daysBeforeYear(date.year) + daysBeforeMonth(date.month) + date.day - 1);
|
|
67
|
+
},
|
|
68
|
+
fromEpochDay(epochDay) {
|
|
69
|
+
const days = epochDay - ISLAMIC_EPOCH_DAY;
|
|
70
|
+
let year = Math.floor((30 * days + 10646) / 10631);
|
|
71
|
+
while (year > 1 && this.toEpochDay({ year, month: 1, day: 1 }) > epochDay) {
|
|
72
|
+
year -= 1;
|
|
73
|
+
}
|
|
74
|
+
while (this.toEpochDay({ year: year + 1, month: 1, day: 1 }) <= epochDay) {
|
|
75
|
+
year += 1;
|
|
76
|
+
}
|
|
77
|
+
let dayOfYear = epochDay - this.toEpochDay({ year, month: 1, day: 1 });
|
|
78
|
+
let month = 1;
|
|
79
|
+
while (month < MONTHS_IN_YEAR) {
|
|
80
|
+
const daysInCurrentMonth = this.daysInMonth(year, month);
|
|
81
|
+
if (dayOfYear < daysInCurrentMonth) {
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
dayOfYear -= daysInCurrentMonth;
|
|
85
|
+
month += 1;
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
year,
|
|
89
|
+
month,
|
|
90
|
+
day: dayOfYear + 1,
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
addDays(date, amount) {
|
|
94
|
+
return this.fromEpochDay(this.toEpochDay(date) + amount);
|
|
95
|
+
},
|
|
96
|
+
nextDay(date) {
|
|
97
|
+
return this.addDays(date, 1);
|
|
98
|
+
},
|
|
99
|
+
prevDay(date) {
|
|
100
|
+
return this.addDays(date, -1);
|
|
101
|
+
},
|
|
102
|
+
getDayOfYear(date) {
|
|
103
|
+
return this.toEpochDay(date) - this.toEpochDay({ year: date.year, month: 1, day: 1 }) + 1;
|
|
104
|
+
},
|
|
105
|
+
getWeekday(date) {
|
|
106
|
+
return gregorianCalendar.getWeekday(gregorianCalendar.fromEpochDay(this.toEpochDay(date)));
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
/**
|
|
110
|
+
* Alias for the default Islamic adapter exported by this package.
|
|
111
|
+
*/
|
|
112
|
+
export const islamicCalendar = islamicCivilCalendar;
|
|
113
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot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AAC,EAAE,CAAC,GAAG,CAAC,CAAA;IAC3F,CAAC;IAED,UAAU,CAAC,IAAuB;QAChC,OAAO,iBAAiB,CAAC,UAAU,CAAC,iBAAiB,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IAC5F,CAAC;CACF,CAAC,CAAA;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@timestamp-js/calendar-islamic",
|
|
3
|
+
"version": "0.1.0-rc.1",
|
|
4
|
+
"description": "Islamic/Hijri calendar adapters for Timestamp.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"calendar",
|
|
7
|
+
"date",
|
|
8
|
+
"hijri",
|
|
9
|
+
"islamic",
|
|
10
|
+
"timestamp",
|
|
11
|
+
"typescript"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://github.com/hawkeye64/timestamp#readme",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/hawkeye64/timestamp/issues"
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": "Jeff <galbraith64@gmail.com>",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/hawkeye64/timestamp.git"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"README.md",
|
|
26
|
+
"LICENSE"
|
|
27
|
+
],
|
|
28
|
+
"type": "module",
|
|
29
|
+
"sideEffects": false,
|
|
30
|
+
"main": "./dist/index.js",
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"import": "./dist/index.js"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@timestamp-js/core": "0.1.0-rc.1"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/node": "26.0.1",
|
|
46
|
+
"oxfmt": "0.56.0",
|
|
47
|
+
"oxlint": "1.71.0",
|
|
48
|
+
"typescript": "6.0.3",
|
|
49
|
+
"vitest": "4.1.9"
|
|
50
|
+
},
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=22.13",
|
|
53
|
+
"pnpm": ">=11.5.0"
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"clean": "rm -rf dist node_modules",
|
|
57
|
+
"prebuild": "pnpm --filter @timestamp-js/core build",
|
|
58
|
+
"build": "tsc -p tsconfig.build.json",
|
|
59
|
+
"format": "oxfmt",
|
|
60
|
+
"format:check": "oxfmt --check",
|
|
61
|
+
"lint": "oxlint",
|
|
62
|
+
"lint:fix": "oxlint --fix",
|
|
63
|
+
"pretest": "pnpm --filter @timestamp-js/core build",
|
|
64
|
+
"test": "vitest run",
|
|
65
|
+
"pretypecheck": "pnpm --filter @timestamp-js/core build",
|
|
66
|
+
"typecheck": "tsc -p tsconfig.build.json --noEmit",
|
|
67
|
+
"verify": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build"
|
|
68
|
+
}
|
|
69
|
+
}
|