Mihrab Methods

Open source · MPL-2.0 · TypeScript, Python, Swift, Kotlin, Dart

Prayer times that match the timetable mosques follow

Mihrab Methods reproduces the published methods of recognised Islamic authorities — a ministry's, a muftiate's, a council of scholars' — and checks every result against the timetable that authority publishes. Fajr, sunrise, Dhuhr, Asr, Maghrib and Isha, calculated offline on the device.

npm install mihrab-methodspip install mihrab-methods
import { nearestPlace, timesFor } from 'mihrab-methods';

// Istanbul, by Diyanet's method
const { place } = nearestPlace('diyanet', 41.01, 28.98)!;
const day = timesFor(place, '2026-10-15');

day.times!.fajr.printed; // 'HH:MM', as printed
day.status;              // 'certified'
0times off the printed minute
77,661,385published times compared, day by day
21authorities, each with its own method
Offlineno request per reader; a free HTTP API if you want one

Every method is compared with its authority's published timetable and is used only at zero times off. What exactly was tested.

Why Mihrab Methods

A general prayer time calculator gives you an angle convention — Muslim World League, ISNA, Umm al-Qura — and lands a minute or a few away from the timetable a country's mosques actually follow.

Authority-specific

Each method is one authority's own: its angles, margins, rounding and reference points, not a generic convention with an offset.

Verified to the minute

Compared day by day with the published timetable. The record is public and regenerated on every change.

Offline

The times are calculated on the device. Nothing is fetched and no request is made per reader.

Made for app developers

TypeScript types, one import per authority and a clear status on every answer — the same methods in Python, Swift, Kotlin and Dart.

A free HTTP API

The same methods over HTTP, free, with no key. Or run the handler yourself, or skip the network entirely.

A plain fallback

For a place no authority publishes for, a plainly labelled standard calculation: MWL, ISNA, Egypt, Karachi, Umm al-Qura, either Asr.

TypeScriptJavaScriptReact NativePythonSwiftKotlinDart / FlutterHTTP

Reference

Built for

Muslim prayer apps, adhan and prayer notification apps, mosque timetable screens and websites, Islamic calendar apps and any product that shows people when to pray.

The Mihrab app computes its prayer times with this library. Mihrab Methods is independent of every authority whose method it reproduces.