Mihrab Methods

Islamiska Förbundet prayer times

Islamiska Förbundet i Sverige publishes the prayer timetable — bönetider — that many Swedish mosques and households follow. If you are building an app or a mosque screen for Swedish Muslims, these are the times your users compare yours against.

Mihrab Methods gives the same times by calculation. It does not take them from Islamiska Förbundet’s website or any service of theirs, and it works without a network connection.

import { nearestPlace, timesFor } from 'mihrab-methods/sweden';

const { place } = nearestPlace('sweden', 55.60, 13.00)!;   // Malmö
const day = timesFor(place, '2026-11-12');
day.status;                 // 'certified' inside the dates compared
day.times!.fajr.printed;    // 'HH:MM', Swedish clock time
day.times!.isha.printed;
GET https://mihrab-api.elghamri.se/v1/times?authority=sweden&lat=55.60&lng=13.00&date=2026-11-12

What was compared

   
Towns of Islamiska Förbundet’s timetable 107
Times compared 65,442
Off the printed minute 0
Dates 11 Oct 2026 → 21 Dec 2027

The match is to the minute, for all six times of the day: Fajr, sunrise, Dhuhr, Asr, Maghrib and Isha.

Where the timetable’s times come from

Islamiska Förbundet’s Swedish timetable follows the method of the 2021 Istanbul prayer times congress — the one Diyanet computes by — and its rows are the rows of Diyanet’s tables for the same Swedish towns. So the library checks the Swedish method twice: against Islamiska Förbundet’s timetable, and against Diyanet’s own tables for 159 Swedish places over 1 Jan 2024 → 31 Dec 2027 (1,393,794 times, 0 off).

What the method does — the 18° Fajr, the 16° Isha, the precautionary minutes, and the rule for summer nights without darkness — is on the Diyanet method page and, formula by formula, in the methods reference.

What was set aside, and why

A comparison is only worth something if it says what it left out. Two kinds of entries in the published timetable were not counted:

  • 35,852 times that differ from Diyanet’s own table for the same town and day. In the published timetable the following year’s rows repeat the current year’s figures, while Diyanet’s table for that year has its own. On those days the library gives Diyanet’s table, and the difference is counted neither as a match nor as a miss.
  • 710 rows copied from another day.

Both are recorded per check in certification.json and explained in where each method stands. If your users see a difference from the printed timetable on a particular day, this is the first place to look — and a report with the town, date, prayer and printed time is welcome.

Practical notes

  • Towns. nearestPlace('sweden', lat, lng) returns the nearest listed town and its distance. Times are that town’s; they are not recomputed for the user’s own coordinates, because the timetable is not.
  • Clock. Answers are on Swedish clock time, summer time included.
  • Beyond the dates compared, an answer is marked method-only: the same calculation, not yet compared with a published timetable.
  • Python, Swift, Kotlin, Dart: the same method is in each port — examples.

Mihrab Methods is an independent open-source project. It is not affiliated with, endorsed by or speaking for Islamiska Förbundet, and it does not copy or redistribute its timetable. Why this can be used freely.

More: prayer times in Sweden · verification · source on GitHub

Edit this page on GitHub · Report a problem