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
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.places = exports.indonesia = void 0;
7
7
  exports.indonesiaZone = indonesiaZone;
8
8
  /**
9
- * Indonesia — Kemenag: every regency and city, at the point its table is
10
- * computed at, in the zone it is printed in.
9
+ * Indonesia — Kemenag: every regency and city, at the coordinates the
10
+ * ministry gives for it, in the zone it is printed in.
11
11
  */
12
12
  const kemenagPlaces_js_1 = __importDefault(require("../data/generated/kemenagPlaces.js"));
13
13
  const kemenagMethodPoints_js_1 = __importDefault(require("../data/generated/kemenagMethodPoints.js"));
@@ -58,7 +58,7 @@ exports.indonesia = (0, registry_js_1.registerAuthority)({
58
58
  certification: indonesiaCertification_js_1.default,
59
59
  description: {
60
60
  name: 'Indonesia — Kemenag (Ministry of Religious Affairs)',
61
- method: 'The precise apparent sun (VSOP87, as JPL’s to a tenth of a second) taken at each prayer’s own moment; Fajr 20°, Isha 18°; sunrise and Maghrib at −1° (−2° in the highland class); Asr when the shadow is its length plus the noon shadow, the noon shadow from the declination at 00:00 UT; every time rounded up after a margin of two minutes (three for Dhuhr, minus three for sunrise).',
61
+ method: 'The precise apparent sun (VSOP87, as JPL’s to a tenth of a second) taken at each prayer’s own moment, without ΔT; each regency at the ministry’s own coordinates; Fajr 20°, Isha 18°; sunrise and Maghrib at −1° (−2° in the highland class); Asr when the shadow is its length plus the noon shadow, the noon shadow from the declination at 00:00 UT; every time rounded up after a margin of two minutes (three for Dhuhr, minus three for sunrise).',
62
62
  countries: ['ID'],
63
63
  parameters: {
64
64
  fajrAngle: 20,
@@ -73,7 +73,7 @@ exports.indonesia = (0, registry_js_1.registerAuthority)({
73
73
  'margin.maghrib': 2,
74
74
  'margin.isha': 2,
75
75
  rounding: 'up to the minute, after the margin',
76
- sun: 'VSOP87 apparent sun (src/sun/preciseSun.ts), iterated at each prayer',
76
+ sun: 'VSOP87 apparent sun (src/sun/preciseSun.ts), iterated at each prayer, Universal Time taken for the ephemeris’ time (no ΔT)',
77
77
  },
78
78
  sources: [{ title: 'Kemenag — Jadwal Shalat', url: 'https://bimasislam.kemenag.go.id/jadwalshalat' }],
79
79
  spec: 'docs/methods.md#indonesia',
@@ -13,6 +13,7 @@ const moroccoMethodPoints_js_1 = __importDefault(require("../data/generated/moro
13
13
  const moroccoCorrections_js_1 = __importDefault(require("../data/generated/moroccoCorrections.js"));
14
14
  const moroccoCertification_js_1 = __importDefault(require("../data/generated/moroccoCertification.js"));
15
15
  const revisions_js_1 = require("../methods/revisions.js");
16
+ const morocco_js_1 = require("../methods/morocco.js");
16
17
  const registry_js_1 = require("../core/registry.js");
17
18
  const AUTHORITY = 'morocco';
18
19
  /**
@@ -22,7 +23,6 @@ const AUTHORITY = 'morocco';
22
23
  const MOROCCO_TZ = 'Etc/GMT';
23
24
  /** The ministry's clock: GMT+1, then GMT — its tables print GMT from 17 September 2026, three days before the clocks moved. */
24
25
  exports.MOROCCO_CLOCK = [['2020-01-01', 60], ['2026-09-17', 0]];
25
- const MOROCCO_DIP_PER_SQRT_M = 0.02;
26
26
  function buildPlaces() {
27
27
  return moroccoCities_js_1.default
28
28
  .filter(c => typeof c.lat === 'number' && typeof c.lng === 'number')
@@ -32,7 +32,7 @@ function buildPlaces() {
32
32
  const p = moroccoMethodPoints_js_1.default[key];
33
33
  return p
34
34
  ? { ...base, lat: p[0], lon: p[1], dipDeg: p[2], ...(p.length > 3 ? { dipMaghribDeg: p[3] } : {}) }
35
- : { ...base, lat: c.lat, lon: c.lng, dipDeg: MOROCCO_DIP_PER_SQRT_M * Math.sqrt(c.heightM ?? 0) };
35
+ : { ...base, lat: c.lat, lon: c.lng, dipDeg: (0, morocco_js_1.moroccoDipEast)(c.heightM ?? 0), dipMaghribDeg: (0, morocco_js_1.moroccoDipWest)(c.heightM ?? 0) };
36
36
  });
37
37
  }
38
38
  exports.morocco = (0, registry_js_1.registerAuthority)({
@@ -43,18 +43,19 @@ exports.morocco = (0, registry_js_1.registerAuthority)({
43
43
  certification: moroccoCertification_js_1.default,
44
44
  description: {
45
45
  name: 'Morocco — Ministry of Habous and Islamic Affairs',
46
- method: 'Meeus’s apparent sun taken at each prayer’s own moment; Fajr 19°, Isha 17°, Asr one shadow; Dhuhr five minutes after transit; sunrise 2.85 minutes before and Maghrib 3.7 minutes after the upper limb on the horizon, less each city’s own horizon dip east and west; Fajr rounded down, the rest to the nearest minute; printed on the ministry’s clock (GMT+1 until 17 September 2026, then GMT).',
46
+ method: 'Meeus’s apparent sun taken at each prayer’s own moment; Fajr 19°, Isha 17°; Asr on the apparent sun — the gnomon’s shadow at noon plus one length, refraction on both altitudes; Dhuhr five minutes after transit; sunrise one minute before and Maghrib 1.8 minutes after the sun on −(34′ + s) less each city’s own horizon allowance east and west (an angle, about 0.32°–0.37° + 0.02°·√height); Fajr rounded down, the rest to the nearest minute; printed on the ministry’s clock (GMT+1 until 17 September 2026, then GMT).',
47
47
  countries: ['MA'],
48
48
  parameters: {
49
49
  fajrAngle: 19,
50
50
  ishaAngle: 17,
51
51
  asrShadow: 1,
52
52
  dhuhrAfterTransitMinutes: 5,
53
- sunriseMarginMinutes: -2.85,
54
- maghribMarginMinutes: 3.7,
53
+ sunriseMarginMinutes: -1.0,
54
+ maghribMarginMinutes: 1.8,
55
55
  refractionArcmin: 34,
56
+ asrRefraction: 'Sæmundsson from the true altitude at noon, Bennett under the apparent altitude at Asr (Meeus 16.4, 16.3)',
56
57
  sunSemidiameter: 'by the sun’s distance that day',
57
- horizonDip: 'per city and per side, fitted (Place.dipDeg, Place.dipMaghribDeg); else 0.02°·√height, 0.86 of it at Maghrib',
58
+ horizonDip: 'per city and per side, fitted (Place.dipDeg, Place.dipMaghribDeg); else 0.32° + 0.025°·√height east, 0.37° + 0.021°·√height west',
58
59
  rounding: 'Fajr down to the minute, the rest to the nearest',
59
60
  sun: 'Meeus, apparent, with the full nutation; chapter-28 equation of time; iterated at each prayer',
60
61
  },
@@ -35,7 +35,7 @@ function candidateInstants(place, year, month, day, asrShadow = 1, opts = {}) {
35
35
  case 'algeria':
36
36
  case 'indonesia': {
37
37
  const t = place.authority === 'morocco'
38
- ? (0, morocco_js_1.moroccoTimes)(place.lat, place.lon, year, month, day, place.dipDeg ?? 0, asrShadow, place.dipMaghribDeg)
38
+ ? (0, morocco_js_1.moroccoTimes)(place.lat, place.lon, year, month, day, place.dipDeg, asrShadow, place.dipMaghribDeg)
39
39
  : place.authority === 'algeria'
40
40
  ? (0, algeria_js_1.algeriaTimes)(place.lat, place.lon, year, month, day, asrShadow)
41
41
  : (0, indonesia_js_1.kemenagTimes)(place.lat, place.lon, year, month, day, { highland: place.highland, twilightDip: place.twilightDip, asrShadow, afternoon: place.afternoon });
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const data = { "certified": true, "checkedAt": "2026-10-18", "places": 68, "checks": [{ "tables": "Algeria — Ministry of Religious Affairs", "places": 68, "times": 101184, "off": 0, "offWithoutCorrections": 642, "from": "2026-10-01", "to": "2027-06-05" }], "corrections": { "from": "2026-10-01", "to": "2027-06-05", "entries": 642, "sha256": "f8d227cdd88aabe5bcd1775ec0324abfdae07a8a3986fdd19816337c2d4ab3ca" }, "revision": 1 };
3
+ const data = { "certified": true, "checkedAt": "2026-11-09", "places": 68, "checks": [{ "tables": "Algeria — Ministry of Religious Affairs", "places": 68, "times": 101184, "off": 0, "offWithoutCorrections": 642, "from": "2026-10-01", "to": "2027-06-05" }], "corrections": { "from": "2026-10-01", "to": "2027-06-05", "entries": 642, "sha256": "f8d227cdd88aabe5bcd1775ec0324abfdae07a8a3986fdd19816337c2d4ab3ca" }, "revision": 1 };
4
4
  exports.default = data;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const data = { "certified": true, "checkedAt": "2026-10-18", "places": 8132, "checks": [{ "tables": "Diyanet — its tables worldwide", "places": 8132, "times": 69999603, "off": 0, "offWithoutCorrections": 9129, "from": "2024-01-01", "to": "2027-12-31" }], "corrections": { "from": "2024-01-01", "to": "2027-12-31", "entries": 9118, "sha256": "47997767e178ce48babd80f0e4a53460c5d379eb098bff1e7ebbba1e6afdf605" }, "revision": 1 };
3
+ const data = { "certified": true, "checkedAt": "2026-11-09", "places": 8132, "checks": [{ "tables": "Diyanet — its tables worldwide", "places": 8132, "times": 69999603, "off": 0, "offWithoutCorrections": 9129, "from": "2024-01-01", "to": "2027-12-31" }], "corrections": { "from": "2024-01-01", "to": "2027-12-31", "entries": 9118, "sha256": "47997767e178ce48babd80f0e4a53460c5d379eb098bff1e7ebbba1e6afdf605" }, "revision": 1 };
4
4
  exports.default = data;