mihrab-methods 1.2.1 → 1.3.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.
Files changed (46) hide show
  1. package/README.md +3 -2
  2. package/certification.json +23 -0
  3. package/data/corrections/turkiyetakvimi.json +120 -0
  4. package/dist/cjs/authorities/turkiyeTakvimi.d.ts +3 -0
  5. package/dist/cjs/authorities/turkiyeTakvimi.js +59 -0
  6. package/dist/cjs/core/compute.js +6 -2
  7. package/dist/cjs/core/types.d.ts +3 -1
  8. package/dist/cjs/core/types.js +1 -1
  9. package/dist/cjs/data/generated/diyanetWorldPoints.js +1 -1
  10. package/dist/cjs/data/generated/turkiyeTakvimiCities.d.ts +8 -0
  11. package/dist/cjs/data/generated/turkiyeTakvimiCities.js +5 -0
  12. package/dist/cjs/data/generated/turkiyetakvimiCertification.d.ts +3 -0
  13. package/dist/cjs/data/generated/turkiyetakvimiCertification.js +4 -0
  14. package/dist/cjs/data/generated/turkiyetakvimiCorrections.d.ts +3 -0
  15. package/dist/cjs/data/generated/turkiyetakvimiCorrections.js +4 -0
  16. package/dist/cjs/index.d.ts +1 -0
  17. package/dist/cjs/index.js +1 -0
  18. package/dist/cjs/methods/revisions.d.ts +1 -0
  19. package/dist/cjs/methods/revisions.js +1 -0
  20. package/dist/cjs/methods/turkiyeTakvimi.d.ts +42 -0
  21. package/dist/cjs/methods/turkiyeTakvimi.js +166 -0
  22. package/dist/cjs/turkiyetakvimi.d.ts +4 -0
  23. package/dist/cjs/turkiyetakvimi.js +22 -0
  24. package/dist/esm/authorities/turkiyeTakvimi.d.ts +3 -0
  25. package/dist/esm/authorities/turkiyeTakvimi.js +53 -0
  26. package/dist/esm/core/compute.js +6 -2
  27. package/dist/esm/core/types.d.ts +3 -1
  28. package/dist/esm/core/types.js +1 -1
  29. package/dist/esm/data/generated/diyanetWorldPoints.js +1 -1
  30. package/dist/esm/data/generated/turkiyeTakvimiCities.d.ts +8 -0
  31. package/dist/esm/data/generated/turkiyeTakvimiCities.js +3 -0
  32. package/dist/esm/data/generated/turkiyetakvimiCertification.d.ts +3 -0
  33. package/dist/esm/data/generated/turkiyetakvimiCertification.js +2 -0
  34. package/dist/esm/data/generated/turkiyetakvimiCorrections.d.ts +3 -0
  35. package/dist/esm/data/generated/turkiyetakvimiCorrections.js +2 -0
  36. package/dist/esm/index.d.ts +1 -0
  37. package/dist/esm/index.js +1 -0
  38. package/dist/esm/methods/revisions.d.ts +1 -0
  39. package/dist/esm/methods/revisions.js +1 -0
  40. package/dist/esm/methods/turkiyeTakvimi.d.ts +42 -0
  41. package/dist/esm/methods/turkiyeTakvimi.js +159 -0
  42. package/dist/esm/turkiyetakvimi.d.ts +4 -0
  43. package/dist/esm/turkiyetakvimi.js +4 -0
  44. package/docs/methods.md +39 -0
  45. package/package.json +17 -2
  46. package/schemas/certification.schema.json +2 -1
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  **Prayer times that match the published timetable to the printed minute.**
10
10
  Each national authority's own calculation method, worked out again from its
11
11
  published times and checked day by day against its timetables: <!--fig:total.off-->0<!--/fig--> of
12
- <!--fig:total.times-->73,645,454<!--/fig--> times off the printed minute. Free for any app, site or
12
+ <!--fig:total.times-->73,824,302<!--/fig--> times off the printed minute. Free for any app, site or
13
13
  mosque to use.
14
14
 
15
15
  [![Usage, a day: npm downloads and API requests](docs/stats.svg)](#usage)
@@ -43,8 +43,9 @@ The full API, the HTTP server and the per-authority imports are in
43
43
  | **Morocco** | Habous | 164 | 94,350 | **0** | 99.879 % | 114 | 27 Aug 2026 → 30 Nov 2026 |
44
44
  | **Algeria** | Ministry of Religious Affairs | 68 | 101,184 | **0** | 99.365 % | 642 | 1 Oct 2026 → 5 Jun 2027 |
45
45
  | **Indonesia** | Kemenag | 517 | 362,934 | **0** | 99.935 % | 234 | 7 Oct 2026 → 31 Jan 2027 |
46
+ | **Türkiye Takvimi** | its cities’ years | 81 | 178,848 | **0** | 99.970 % | 52 | 31 Dec 2025 → 2 Jan 2027 |
46
47
 
47
- 5 of 5 methods certified; 0 of 73,645,454 times off the printed minute. Last checked 9 November 2026. Generated from [`certification.json`](certification.json) by `scripts/readme.mjs`.
48
+ 6 of 6 methods certified; 0 of 73,824,302 times off the printed minute. Last checked 9 November 2026. Generated from [`certification.json`](certification.json) by `scripts/readme.mjs`.
48
49
  <!-- certification-table:end -->
49
50
 
50
51
  "By the method alone" is the formula without its correction list. The list
@@ -127,5 +127,28 @@
127
127
  "sha256": "a3f1c30576ddddbfda6cadabe442e1bcf3fb476b018b269d7d4783edd4e39d03"
128
128
  },
129
129
  "revision": 2
130
+ },
131
+ "turkiyetakvimi": {
132
+ "certified": true,
133
+ "checkedAt": "2026-11-11",
134
+ "places": 81,
135
+ "checks": [
136
+ {
137
+ "tables": "Türkiye Takvimi — its cities’ years",
138
+ "places": 81,
139
+ "times": 178848,
140
+ "off": 0,
141
+ "offWithoutCorrections": 52,
142
+ "from": "2025-12-31",
143
+ "to": "2027-01-02"
144
+ }
145
+ ],
146
+ "corrections": {
147
+ "from": "2025-12-31",
148
+ "to": "2027-01-02",
149
+ "entries": 52,
150
+ "sha256": "a3059fd5aae0b0f8ddee10a2aaaf93e982ded12e652f6aa21d0a3d347a082b41"
151
+ },
152
+ "revision": 1
130
153
  }
131
154
  }
@@ -0,0 +1,120 @@
1
+ {
2
+ "from": "2025-12-31",
3
+ "to": "2027-01-02",
4
+ "points": {
5
+ "36.999,35.316": [
6
+ "2026-01-07 fajr -1"
7
+ ],
8
+ "37.184,33.216": [
9
+ "2026-01-20 fajr -1",
10
+ "2026-01-27 fajr -1"
11
+ ],
12
+ "37.217,28.366": [
13
+ "2026-11-18 sunrise +1"
14
+ ],
15
+ "37.767,30.550": [
16
+ "2026-05-26 isha -1"
17
+ ],
18
+ "37.850,27.850": [
19
+ "2026-03-06 dhuhr -1"
20
+ ],
21
+ "37.866,32.483": [
22
+ "2026-06-08 maghrib +1"
23
+ ],
24
+ "37.917,40.233": [
25
+ "2026-11-16 dhuhr +1"
26
+ ],
27
+ "38.367,34.033": [
28
+ "2026-04-16 isha -1"
29
+ ],
30
+ "38.383,42.099": [
31
+ "2026-03-26 maghrib -1"
32
+ ],
33
+ "38.633,34.717": [
34
+ "2026-05-31 asr +1",
35
+ "2026-07-02 asr +1"
36
+ ],
37
+ "38.733,35.483": [
38
+ "2026-05-04 isha +1"
39
+ ],
40
+ "38.883,40.483": [
41
+ "2026-03-25 sunrise -1"
42
+ ],
43
+ "39.716,43.050": [
44
+ "2026-02-01 isha -1",
45
+ "2026-02-20 fajr -1",
46
+ "2026-03-04 maghrib -1"
47
+ ],
48
+ "39.750,39.500": [
49
+ "2026-01-17 isha -1",
50
+ "2026-02-22 dhuhr -1"
51
+ ],
52
+ "39.933,32.849": [
53
+ "2026-02-22 isha -1"
54
+ ],
55
+ "40.316,36.550": [
56
+ "2026-02-01 dhuhr -1"
57
+ ],
58
+ "40.599,43.083": [
59
+ "2026-05-06 dhuhr +1"
60
+ ],
61
+ "40.650,29.266": [
62
+ "2026-01-26 asr -1"
63
+ ],
64
+ "40.650,35.833": [
65
+ "2026-10-03 fajr +1"
66
+ ],
67
+ "40.733,31.616": [
68
+ "2026-03-24 maghrib +1",
69
+ "2026-09-08 dhuhr +1"
70
+ ],
71
+ "40.767,29.950": [
72
+ "2026-03-05 maghrib -1",
73
+ "2026-04-14 sunrise -1"
74
+ ],
75
+ "40.850,31.150": [
76
+ "2026-07-19 sunrise -1"
77
+ ],
78
+ "40.983,27.516": [
79
+ "2026-07-03 dhuhr +1",
80
+ "2026-11-26 dhuhr +1",
81
+ "2026-12-23 asr +1"
82
+ ],
83
+ "41.000,29.000": [
84
+ "2026-03-31 sunrise -1",
85
+ "2026-12-15 maghrib -1",
86
+ "2026-12-16 maghrib -1",
87
+ "2026-12-17 maghrib -1",
88
+ "2026-12-17 sunrise -1",
89
+ "2026-12-18 maghrib -1",
90
+ "2026-12-21 maghrib -1",
91
+ "2026-12-24 sunrise -1",
92
+ "2026-12-27 sunrise -1",
93
+ "2026-12-31 sunrise -1"
94
+ ],
95
+ "41.033,40.517": [
96
+ "2026-04-19 maghrib +1"
97
+ ],
98
+ "41.200,32.632": [
99
+ "2026-02-20 dhuhr -1",
100
+ "2026-03-21 fajr -1"
101
+ ],
102
+ "41.367,33.783": [
103
+ "2026-04-05 asr -1"
104
+ ],
105
+ "41.450,31.800": [
106
+ "2026-05-22 sunrise -1",
107
+ "2026-08-09 asr +1"
108
+ ],
109
+ "41.666,26.567": [
110
+ "2026-04-23 isha +1"
111
+ ],
112
+ "41.733,27.217": [
113
+ "2026-06-28 fajr +1",
114
+ "2026-09-19 isha -1"
115
+ ],
116
+ "42.033,35.150": [
117
+ "2026-10-11 maghrib +1"
118
+ ]
119
+ }
120
+ }
@@ -0,0 +1,3 @@
1
+ import type { Place } from '../core/types.js';
2
+ export declare const turkiyeTakvimi: import("../core/registry.js").AuthorityData;
3
+ export declare const places: readonly Place[];
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.places = exports.turkiyeTakvimi = void 0;
7
+ /**
8
+ * Türkiye Takvimi — the calendar's cities, each at the point and with the
9
+ * temkin its published year is computed with. The first list is Türkiye's
10
+ * 81 province centres.
11
+ */
12
+ const turkiyeTakvimiCities_js_1 = __importDefault(require("../data/generated/turkiyeTakvimiCities.js"));
13
+ const turkiyetakvimiCorrections_js_1 = __importDefault(require("../data/generated/turkiyetakvimiCorrections.js"));
14
+ const turkiyetakvimiCertification_js_1 = __importDefault(require("../data/generated/turkiyetakvimiCertification.js"));
15
+ const revisions_js_1 = require("../methods/revisions.js");
16
+ const registry_js_1 = require("../core/registry.js");
17
+ const AUTHORITY = 'turkiyetakvimi';
18
+ function buildPlaces() {
19
+ return turkiyeTakvimiCities_js_1.default.map(c => {
20
+ const key = String(c.id);
21
+ return {
22
+ authority: AUTHORITY,
23
+ id: `${AUTHORITY}:${key}`,
24
+ key,
25
+ name: c.name,
26
+ country: 'TR',
27
+ lat: c.lat,
28
+ lon: c.lon,
29
+ tz: 'Europe/Istanbul',
30
+ temkin: c.temkin,
31
+ };
32
+ });
33
+ }
34
+ exports.turkiyeTakvimi = (0, registry_js_1.registerAuthority)({
35
+ authority: AUTHORITY,
36
+ revision: revisions_js_1.METHOD_REVISION.turkiyetakvimi,
37
+ places: buildPlaces(),
38
+ corrections: turkiyetakvimiCorrections_js_1.default,
39
+ certification: turkiyetakvimiCertification_js_1.default,
40
+ description: {
41
+ name: 'Türkiye Takvimi',
42
+ method: 'The precise apparent sun at each event’s own moment, and a temkin T per city (the time the sun takes on the summer solstice from the level horizon to the city’s own). Fajr is the calendar’s Sabâh, the sun 18° below the horizon with no temkin; sunrise the sun’s centre on the level horizon less T and two minutes; Dhuhr the transit plus T; Asr (the noon shadow taken at the declination of local noon) and Isha (17°) plus T; Maghrib the level horizon plus T and two minutes; every time rounded up to the minute.',
43
+ countries: ['TR'],
44
+ parameters: {
45
+ fajrAngle: 18,
46
+ ishaAngle: 17,
47
+ sunriseAltitude: 0,
48
+ asrShadow: 1,
49
+ asrNoonShadow: 'tan|φ − δ| at the declination of local noon',
50
+ temkin: 'per city, minutes: on Dhuhr, Asr, Maghrib and Isha, and before sunrise',
51
+ horizonMarginMinutes: 2,
52
+ rounding: 'up to the minute',
53
+ sun: 'precise apparent sun (VSOP87, IAU 2006 precession, IAU 2000B nutation), iterated at each event',
54
+ },
55
+ sources: [{ title: 'Türkiye Takvimi — namaz vakitleri', url: 'https://www.namazvakti.com/' }],
56
+ spec: 'docs/methods.md#türkiye-takvimi',
57
+ },
58
+ });
59
+ exports.places = exports.turkiyeTakvimi.places;
@@ -11,6 +11,7 @@ const sweden_js_1 = require("../methods/sweden.js");
11
11
  const morocco_js_1 = require("../methods/morocco.js");
12
12
  const algeria_js_1 = require("../methods/algeria.js");
13
13
  const indonesia_js_1 = require("../methods/indonesia.js");
14
+ const turkiyeTakvimi_js_1 = require("../methods/turkiyeTakvimi.js");
14
15
  const registry_js_1 = require("./registry.js");
15
16
  const clock_js_1 = require("./clock.js");
16
17
  /**
@@ -33,12 +34,15 @@ function candidateInstants(place, year, month, day, asrShadow = 1, opts = {}) {
33
34
  }
34
35
  case 'morocco':
35
36
  case 'algeria':
36
- case 'indonesia': {
37
+ case 'indonesia':
38
+ case 'turkiyetakvimi': {
37
39
  const t = place.authority === 'morocco'
38
40
  ? (0, morocco_js_1.moroccoTimes)(place.lat, place.lon, year, month, day, place.dipDeg, asrShadow, place.dipMaghribDeg)
39
41
  : place.authority === 'algeria'
40
42
  ? (0, algeria_js_1.algeriaTimes)(place.lat, place.lon, year, month, day, asrShadow)
41
- : (0, indonesia_js_1.kemenagTimes)(place.lat, place.lon, year, month, day, { highland: place.highland, twilightDip: place.twilightDip, asrShadow, afternoon: place.afternoon });
43
+ : place.authority === 'turkiyetakvimi'
44
+ ? (0, turkiyeTakvimi_js_1.takvimTimes)(place.lat, place.lon, year, month, day, place.temkin, asrShadow)
45
+ : (0, indonesia_js_1.kemenagTimes)(place.lat, place.lon, year, month, day, { highland: place.highland, twilightDip: place.twilightDip, asrShadow, afternoon: place.afternoon });
42
46
  // the correction list: the authority's few times on the other side of a minute (the standard Asr only)
43
47
  const c = !t || !fix ? undefined : fix.correction(place.lat, place.lon, year, month, day);
44
48
  if (!t || !c)
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The shapes the library speaks in. Nothing here computes anything.
3
3
  */
4
- export type Authority = 'sweden' | 'diyanet' | 'morocco' | 'algeria' | 'indonesia';
4
+ export type Authority = 'sweden' | 'diyanet' | 'morocco' | 'algeria' | 'indonesia' | 'turkiyetakvimi';
5
5
  export declare const AUTHORITIES: readonly Authority[];
6
6
  export type PrayerKey = 'fajr' | 'sunrise' | 'dhuhr' | 'asr' | 'maghrib' | 'isha';
7
7
  export declare const PRAYER_KEYS: readonly PrayerKey[];
@@ -34,6 +34,8 @@ export type Place = {
34
34
  twilightDip?: boolean;
35
35
  /** Indonesia: where the ministry computes the regency's Asr, Maghrib and Isha, when not at its point. */
36
36
  afternoon?: readonly [number, number];
37
+ /** Türkiye Takvimi: the city's temkin as its table shows it, minutes with their fraction. */
38
+ temkin?: number;
37
39
  /** Diyanet: Isha's depression, 16° or 17° by country. */
38
40
  ishaDeg?: number;
39
41
  /**
@@ -4,7 +4,7 @@
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.UncertifiedMethodError = exports.PRAYER_KEYS = exports.AUTHORITIES = void 0;
7
- exports.AUTHORITIES = ['sweden', 'diyanet', 'morocco', 'algeria', 'indonesia'];
7
+ exports.AUTHORITIES = ['sweden', 'diyanet', 'morocco', 'algeria', 'indonesia', 'turkiyetakvimi'];
8
8
  exports.PRAYER_KEYS = ['fajr', 'sunrise', 'dhuhr', 'asr', 'maghrib', 'isha'];
9
9
  /** The method has not reproduced its authority's tables to the minute (or not for this date). */
10
10
  class UncertifiedMethodError extends Error {