mihrab-methods 1.2.0 → 1.3.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 (51) hide show
  1. package/README.md +5 -3
  2. package/certification.json +30 -7
  3. package/data/corrections/diyanet.json +455 -0
  4. package/data/corrections/turkiyetakvimi.json +120 -0
  5. package/dist/cjs/authorities/turkiyeTakvimi.d.ts +3 -0
  6. package/dist/cjs/authorities/turkiyeTakvimi.js +59 -0
  7. package/dist/cjs/core/compute.js +6 -2
  8. package/dist/cjs/core/types.d.ts +3 -1
  9. package/dist/cjs/core/types.js +1 -1
  10. package/dist/cjs/data/generated/diyanetCertification.js +1 -1
  11. package/dist/cjs/data/generated/diyanetCorrections.js +1 -1
  12. package/dist/cjs/data/generated/diyanetWorldPoints.js +1 -1
  13. package/dist/cjs/data/generated/turkiyeTakvimiCities.d.ts +8 -0
  14. package/dist/cjs/data/generated/turkiyeTakvimiCities.js +5 -0
  15. package/dist/cjs/data/generated/turkiyetakvimiCertification.d.ts +3 -0
  16. package/dist/cjs/data/generated/turkiyetakvimiCertification.js +4 -0
  17. package/dist/cjs/data/generated/turkiyetakvimiCorrections.d.ts +3 -0
  18. package/dist/cjs/data/generated/turkiyetakvimiCorrections.js +4 -0
  19. package/dist/cjs/index.d.ts +1 -0
  20. package/dist/cjs/index.js +1 -0
  21. package/dist/cjs/methods/revisions.d.ts +1 -0
  22. package/dist/cjs/methods/revisions.js +1 -0
  23. package/dist/cjs/methods/turkiyeTakvimi.d.ts +42 -0
  24. package/dist/cjs/methods/turkiyeTakvimi.js +166 -0
  25. package/dist/cjs/turkiyetakvimi.d.ts +4 -0
  26. package/dist/cjs/turkiyetakvimi.js +22 -0
  27. package/dist/esm/authorities/turkiyeTakvimi.d.ts +3 -0
  28. package/dist/esm/authorities/turkiyeTakvimi.js +53 -0
  29. package/dist/esm/core/compute.js +6 -2
  30. package/dist/esm/core/types.d.ts +3 -1
  31. package/dist/esm/core/types.js +1 -1
  32. package/dist/esm/data/generated/diyanetCertification.js +1 -1
  33. package/dist/esm/data/generated/diyanetCorrections.js +1 -1
  34. package/dist/esm/data/generated/diyanetWorldPoints.js +1 -1
  35. package/dist/esm/data/generated/turkiyeTakvimiCities.d.ts +8 -0
  36. package/dist/esm/data/generated/turkiyeTakvimiCities.js +3 -0
  37. package/dist/esm/data/generated/turkiyetakvimiCertification.d.ts +3 -0
  38. package/dist/esm/data/generated/turkiyetakvimiCertification.js +2 -0
  39. package/dist/esm/data/generated/turkiyetakvimiCorrections.d.ts +3 -0
  40. package/dist/esm/data/generated/turkiyetakvimiCorrections.js +2 -0
  41. package/dist/esm/index.d.ts +1 -0
  42. package/dist/esm/index.js +1 -0
  43. package/dist/esm/methods/revisions.d.ts +1 -0
  44. package/dist/esm/methods/revisions.js +1 -0
  45. package/dist/esm/methods/turkiyeTakvimi.d.ts +42 -0
  46. package/dist/esm/methods/turkiyeTakvimi.js +159 -0
  47. package/dist/esm/turkiyetakvimi.d.ts +4 -0
  48. package/dist/esm/turkiyetakvimi.js +4 -0
  49. package/docs/methods.md +39 -0
  50. package/package.json +18 -2
  51. package/schemas/certification.schema.json +2 -1
@@ -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 {
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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 };
3
+ const data = { "certified": true, "checkedAt": "2026-11-11", "places": 8318, "checks": [{ "tables": "Diyanet — its tables worldwide", "places": 8318, "times": 71630078, "off": 0, "offWithoutCorrections": 9368, "from": "2024-01-01", "to": "2027-12-31" }], "corrections": { "from": "2024-01-01", "to": "2027-12-31", "entries": 9357, "sha256": "a8c6a7305611f8dcedc04a64efb8dd150d9a588c2b3ac3391bfb776d70a2ec83" }, "revision": 1 };
4
4
  exports.default = data;