mihrab-methods 1.0.2 → 1.2.0

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.
Files changed (56) hide show
  1. package/README.md +23 -6
  2. package/certification.json +23 -23
  3. package/data/corrections/indonesia.json +528 -132
  4. package/data/corrections/morocco.json +201 -914
  5. package/dist/cjs/authorities/indonesia.js +4 -4
  6. package/dist/cjs/authorities/morocco.js +7 -6
  7. package/dist/cjs/core/compute.js +1 -1
  8. package/dist/cjs/data/generated/algeriaCertification.js +1 -1
  9. package/dist/cjs/data/generated/diyanetCertification.js +1 -1
  10. package/dist/cjs/data/generated/diyanetWorldPoints.js +1 -1
  11. package/dist/cjs/data/generated/indonesiaCertification.js +1 -1
  12. package/dist/cjs/data/generated/indonesiaCorrections.js +1 -1
  13. package/dist/cjs/data/generated/kemenagMethodPoints.js +1 -1
  14. package/dist/cjs/data/generated/moroccoCertification.js +1 -1
  15. package/dist/cjs/data/generated/moroccoCorrections.js +1 -1
  16. package/dist/cjs/data/generated/moroccoMethodPoints.js +1 -1
  17. package/dist/cjs/data/generated/swedenCertification.js +1 -1
  18. package/dist/cjs/methods/indonesia.d.ts +2 -2
  19. package/dist/cjs/methods/indonesia.js +16 -9
  20. package/dist/cjs/methods/morocco.d.ts +43 -20
  21. package/dist/cjs/methods/morocco.js +59 -25
  22. package/dist/cjs/methods/revisions.d.ts +2 -2
  23. package/dist/cjs/methods/revisions.js +2 -2
  24. package/dist/cjs/server.d.ts +12 -0
  25. package/dist/cjs/server.js +132 -0
  26. package/dist/cjs/sun/preciseSun.d.ts +6 -1
  27. package/dist/cjs/sun/preciseSun.js +7 -2
  28. package/dist/esm/authorities/indonesia.js +4 -4
  29. package/dist/esm/authorities/morocco.js +7 -6
  30. package/dist/esm/core/compute.js +1 -1
  31. package/dist/esm/data/generated/algeriaCertification.js +1 -1
  32. package/dist/esm/data/generated/diyanetCertification.js +1 -1
  33. package/dist/esm/data/generated/diyanetWorldPoints.js +1 -1
  34. package/dist/esm/data/generated/indonesiaCertification.js +1 -1
  35. package/dist/esm/data/generated/indonesiaCorrections.js +1 -1
  36. package/dist/esm/data/generated/kemenagMethodPoints.js +1 -1
  37. package/dist/esm/data/generated/moroccoCertification.js +1 -1
  38. package/dist/esm/data/generated/moroccoCorrections.js +1 -1
  39. package/dist/esm/data/generated/moroccoMethodPoints.js +1 -1
  40. package/dist/esm/data/generated/swedenCertification.js +1 -1
  41. package/dist/esm/methods/indonesia.d.ts +2 -2
  42. package/dist/esm/methods/indonesia.js +16 -9
  43. package/dist/esm/methods/morocco.d.ts +43 -20
  44. package/dist/esm/methods/morocco.js +54 -24
  45. package/dist/esm/methods/revisions.d.ts +2 -2
  46. package/dist/esm/methods/revisions.js +2 -2
  47. package/dist/esm/server.d.ts +12 -0
  48. package/dist/esm/server.js +126 -0
  49. package/dist/esm/sun/preciseSun.d.ts +6 -1
  50. package/dist/esm/sun/preciseSun.js +7 -2
  51. package/docs/methods.md +34 -10
  52. package/package.json +11 -2
  53. package/dist/cjs/methods/scratch-congress.d.ts +0 -87
  54. package/dist/cjs/methods/scratch-congress.js +0 -539
  55. package/dist/esm/methods/scratch-congress.d.ts +0 -87
  56. package/dist/esm/methods/scratch-congress.js +0 -534
package/README.md CHANGED
@@ -2,14 +2,18 @@
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/mihrab-methods)](https://www.npmjs.com/package/mihrab-methods)
4
4
  [![checks](https://github.com/MihrabHQ/mihrab-methods/actions/workflows/ci.yml/badge.svg)](https://github.com/MihrabHQ/mihrab-methods/actions/workflows/ci.yml)
5
+ [![feed](https://github.com/MihrabHQ/mihrab-methods/actions/workflows/feed.yml/badge.svg)](https://github.com/MihrabHQ/mihrab-methods/actions/workflows/feed.yml)
6
+ [![downloads](https://img.shields.io/npm/dm/mihrab-methods)](#usage)
5
7
  [![certification](docs/certification.svg)](#how-verification-works)
6
8
 
7
9
  **Prayer times that match the published timetable to the printed minute.**
8
10
  Each national authority's own calculation method, worked out again from its
9
11
  published times and checked day by day against its timetables: <!--fig:total.off-->0<!--/fig--> of
10
- <!--fig:total.times-->71,896,761<!--/fig--> times off the printed minute. Free for any app, site or
12
+ <!--fig:total.times-->72,014,979<!--/fig--> times off the printed minute. Free for any app, site or
11
13
  mosque to use.
12
14
 
15
+ [![Usage, a day: npm downloads and API requests](docs/stats.svg)](#usage)
16
+
13
17
  ```sh
14
18
  npm install mihrab-methods
15
19
  ```
@@ -33,14 +37,14 @@ The full API, the HTTP server and the per-authority imports are in
33
37
  <!-- certification-table:start -->
34
38
  | Authority | Tables matched | Places | Times checked | Off the printed minute | By the method alone | Correction entries | Checked over |
35
39
  |---|---|---:|---:|---:|---:|---:|---|
36
- | **Sweden** | Islamiska Förbundet’s tables | 107 | 59,640 | **0** | 99.966 % | 270 | 11 Oct 2026 → 19 Nov 2027 |
40
+ | **Sweden** | Islamiska Förbundet’s tables | 107 | 63,114 | **0** | 99.968 % | 270 | 11 Oct 2026 → 14 Dec 2027 |
37
41
  | | Diyanet’s own tables | 159 | 1,393,794 | **0** | 99.981 % | | 1 Jan 2024 → 31 Dec 2027 |
38
42
  | **Diyanet** | its tables worldwide | 8,132 | 69,999,603 | **0** | 99.986 % | 9,118 | 1 Jan 2024 → 31 Dec 2027 |
39
- | **Morocco** | Habous | 164 | 75,768 | **0** | 99.122 % | 665 | 27 Aug 2026 → 11 Nov 2026 |
43
+ | **Morocco** | Habous | 164 | 94,350 | **0** | 99.879 % | 114 | 27 Aug 2026 → 30 Nov 2026 |
40
44
  | **Algeria** | Ministry of Religious Affairs | 68 | 101,184 | **0** | 99.365 % | 642 | 1 Oct 2026 → 5 Jun 2027 |
41
- | **Indonesia** | Kemenag | 517 | 266,772 | **0** | 99.968 % | 84 | 7 Oct 2026 → 31 Dec 2026 |
45
+ | **Indonesia** | Kemenag | 517 | 362,934 | **0** | 99.935 % | 234 | 7 Oct 2026 → 31 Jan 2027 |
42
46
 
43
- 5 of 5 methods certified; 0 of 71,896,761 times off the printed minute. Last checked 18 October 2026. Generated from [`certification.json`](certification.json) by `scripts/readme.mjs`.
47
+ 5 of 5 methods certified; 0 of 72,014,979 times off the printed minute. Last checked 9 November 2026. Generated from [`certification.json`](certification.json) by `scripts/readme.mjs`.
44
48
  <!-- certification-table:end -->
45
49
 
46
50
  "By the method alone" is the formula without its correction list. The list
@@ -64,7 +68,9 @@ minute either way. Why that can be used freely is in
64
68
  3. **The record.** [`tools/certify.ts`](tools/certify.ts) writes
65
69
  [`certification.json`](certification.json): per authority, the tables
66
70
  checked, the times, how many are off with and without the correction
67
- list, the dates, the method's revision and the list's SHA-256.
71
+ list, the dates, the method's revision and the list's SHA-256. The
72
+ tables are checked again whenever they change and every week, and each
73
+ check that finds a method still at 0 off dates its entry anew.
68
74
  4. **The gate.** A method is certified only at **0** off. `timesFor` refuses
69
75
  an uncertified method, and says `'method-only'` for a date past the
70
76
  checked span. Every number on this page, on the Mihrab website and in its
@@ -90,6 +96,17 @@ It takes a list only for the revision the build computes, only when it is
90
96
  the list the record names, and only when its SHA-256 matches. Schemas, tags
91
97
  as fixed addresses and the details: [docs/feed.md](docs/feed.md).
92
98
 
99
+ ## Usage
100
+
101
+ <!-- usage:start -->
102
+ | | Last 7 days | Last 30 days | Since the first release |
103
+ |---|---:|---:|---:|
104
+ | npm downloads | 264 | 977 | 977 |
105
+ | API requests | 1,900 | 1,900 | 1,900 (since 2026-11-04) |
106
+
107
+ Counts only, to 2026-11-08, updated weekly (`scripts/stats.mjs`, history in [docs/stats.json](docs/stats.json)): npm's public download counts — every install counts, CI and mirrors included — and Cloudflare's request counts for the API. No addresses, queries or places are recorded anywhere.
108
+ <!-- usage:end -->
109
+
93
110
  ## More
94
111
 
95
112
  | | |
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "sweden": {
3
3
  "certified": true,
4
- "checkedAt": "2026-10-18",
4
+ "checkedAt": "2026-11-09",
5
5
  "places": 108,
6
6
  "checks": [
7
7
  {
8
8
  "tables": "Sweden — Islamiska Förbundet’s tables",
9
9
  "places": 107,
10
- "times": 59640,
10
+ "times": 63114,
11
11
  "off": 0,
12
12
  "offWithoutCorrections": 20,
13
13
  "from": "2026-10-11",
14
- "to": "2027-11-19",
14
+ "to": "2027-12-14",
15
15
  "setAside": {
16
16
  "misplaced": [],
17
- "sourceFaults": 33395,
18
- "copiedRows": 646
17
+ "sourceFaults": 35491,
18
+ "copiedRows": 696
19
19
  }
20
20
  },
21
21
  {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "diyanet": {
40
40
  "certified": true,
41
- "checkedAt": "2026-10-18",
41
+ "checkedAt": "2026-11-09",
42
42
  "places": 8132,
43
43
  "checks": [
44
44
  {
@@ -61,30 +61,30 @@
61
61
  },
62
62
  "morocco": {
63
63
  "certified": true,
64
- "checkedAt": "2026-10-18",
64
+ "checkedAt": "2026-11-11",
65
65
  "places": 164,
66
66
  "checks": [
67
67
  {
68
68
  "tables": "Morocco — Habous",
69
69
  "places": 164,
70
- "times": 75768,
70
+ "times": 94350,
71
71
  "off": 0,
72
- "offWithoutCorrections": 665,
72
+ "offWithoutCorrections": 114,
73
73
  "from": "2026-08-27",
74
- "to": "2026-11-11"
74
+ "to": "2026-11-30"
75
75
  }
76
76
  ],
77
77
  "corrections": {
78
78
  "from": "2026-08-27",
79
- "to": "2026-11-11",
80
- "entries": 665,
81
- "sha256": "26ccb0979ee3e632c5acd736fdba3f8272530b48577cb1c0f2897d061e695bd0"
79
+ "to": "2026-11-30",
80
+ "entries": 114,
81
+ "sha256": "2ae7161a7164f7ccebf1aa9f81628a810ce8fdd337e0645907e6c58d0be6aae9"
82
82
  },
83
- "revision": 1
83
+ "revision": 2
84
84
  },
85
85
  "algeria": {
86
86
  "certified": true,
87
- "checkedAt": "2026-10-18",
87
+ "checkedAt": "2026-11-09",
88
88
  "places": 68,
89
89
  "checks": [
90
90
  {
@@ -107,25 +107,25 @@
107
107
  },
108
108
  "indonesia": {
109
109
  "certified": true,
110
- "checkedAt": "2026-10-18",
110
+ "checkedAt": "2026-11-11",
111
111
  "places": 517,
112
112
  "checks": [
113
113
  {
114
114
  "tables": "Indonesia — Kemenag",
115
115
  "places": 517,
116
- "times": 266772,
116
+ "times": 362934,
117
117
  "off": 0,
118
- "offWithoutCorrections": 84,
118
+ "offWithoutCorrections": 234,
119
119
  "from": "2026-10-07",
120
- "to": "2026-12-31"
120
+ "to": "2027-01-31"
121
121
  }
122
122
  ],
123
123
  "corrections": {
124
124
  "from": "2026-10-07",
125
- "to": "2026-12-31",
126
- "entries": 84,
127
- "sha256": "7c7d3b09a5b01a4d77c605ad8a37fbdac4fd3ef65df483332d75c67891b2359e"
125
+ "to": "2027-01-31",
126
+ "entries": 234,
127
+ "sha256": "a3f1c30576ddddbfda6cadabe442e1bcf3fb476b018b269d7d4783edd4e39d03"
128
128
  },
129
- "revision": 1
129
+ "revision": 2
130
130
  }
131
131
  }