Skip to content

Calculation Methods

Al-Falak supports 12 calculation methods. Each method defines Fajr and Isha angles (or intervals) and may include additional adjustments.

Method Fajr Angle Isha Angle Isha Interval Notes
Muslim World League 18° 17° — Standard MWL method
ISNA (North America) 15° 15° — Not recommended for general use
Egyptian 19.5° 17.5° — Egyptian General Authority
Karachi 18° 18° — University of Islamic Sciences
Umm al-Qura 18.5° — 90 min (120 in Ramadan via is_ramadan=True) Makkah; flag is caller-set, UQU preset only
Dubai 18.2° 18.2° — Gulf region
Moonsighting Committee 18° 18° — Seasonal adjustments
Kuwait 18° 17.5° — Kuwait method
Qatar 18° — 90 min Modified Umm al-Qura
Singapore 20° 18° — Singapore method
UOIF 12° 12° — Union des organisations islamiques de France
JAKIM 18° 18° — Malaysia (JAKIM); current 18/18 Subuh criterion

JAKIM uses Fajr 18° and Isha 18° with dhuhr +1. It deliberately differs from SINGAPORE (Fajr 20°): current JAKIM/Takwim tables use an 18° Subuh criterion, while the Singapore preset retains 20°. The separate preset exists for Malaysian operations (Malay naming and e-solat timetable alignment). It does not select a timezone: PrayerTimes returns UTC unless you pass time_zone=ZoneInfo("Asia/Kuala_Lumpur") (or the relevant Malaysian zone) when displaying local times.

Verification anchors (checked 2026-10-25): Kuala Lumpur (3.1390, 101.6869) and Kota Kinabalu (5.9804, 116.0735) on 2025-01-15 lock the computed 18/18 baseline in tests/test_prayer_times.py. Official rows are compared against the computed values: across the cited 2025 Kuala Lumpur table the residual spans −1 to +4 minutes (table rounding plus a small ihtiyat), and the tests pin the exact per-row residuals. A 20° Fajr angle is 9–12 minutes early versus those rows and fails the golden; the 18° Fajr is 8–10 minutes later than the Singapore preset.

The published tables round minute times and apply a small administrative ihtiyat; they are not an exact sub-minute reference. The golden tests therefore assert the documented residual envelope rather than pretending the tables are computed output.

Imsak = Fajr - imsak_offset (default 10 minutes, configurable via CalculationParameters(imsak_offset=...)). The JAKIM convention defaults to 10, but published Malaysian tables are mostly — not always — exactly Fajr-10, so the offset stays configurable rather than hardcoded. The offset applies to the unrounded Fajr before the final minute rounding (equivalent to applying it to the rounded Fajr for integer-minute offsets); adjustments.imsak applies on top, and Fajr adjustments flow through to Imsak. Defined for all methods including NONE.

Pure sunrise derivations, no new astronomy:

  • Syuruk == sunrise — the MY/SG name for sunrise/end-of-Fajr.
  • Ishraq = sunrise + ishraq_offset (default 15 minutes, configurable).
  • Dhuha = sunrise + dhuha_offset (default 28 minutes, configurable) marks the start of the Dhuha window, not a canonical point. The 28-minute figure comes from a single Malaysian Syuruk+28 source and is not universal fiqh.

Sunrise adjustments flow through to all three markers; adjustments.ishraq and adjustments.dhuha apply on top. There is intentionally no separate adjustments.syuruk slot: Syuruk is sunrise under its MY/SG name. Ordering for defaults: fajr < sunrise <= syuruk <= ishraq <= dhuha <= dhuhr. CalculationParameters rejects dhuha_offset < ishraq_offset with a ValidationError so the offset configuration alone can never invert the ishraq <= dhuha link (per-prayer adjustments can still shift individual markers afterwards).

CalculationParameters(elevation_m=...) (default 0 = sea level) applies the dip-of-horizon correction to sunrise, sunset and Maghrib: h0 = -0.833° - 0.0293°·√h_m (h in metres, Nautical Almanac/Bowditch). Direct SolarTime construction and CalculationParameters both reject non-finite or negative elevations with a ValidationError. Angle-based Fajr/Isha and transit-based Dhuhr are unaffected. At 1000 m sunrise is minutes earlier and sunset minutes later (covered by tests); sea-level goldens are unchanged.

  • Dubai: the 18.2°/18.2° angles plus sunrise -3, dhuhr +3, asr +3, maghrib +3 minute offsets are app-level tuning carried over from BatoulApps research, not an official IACAD/Awqaf specification. Treat them as conventional, not authoritative.
  • Qatar: this preset follows the library-canonical 18° + 90-minute Isha definition. Some current Doha Awqaf publications cite 18.5° + 90 minutes; that conflict is recorded here and left unresolved pending a primary source.

Most methods compute Isha from a twilight angle (isha_angle). Two presets instead use a fixed interval after Maghrib:

Preset Mode Value
Umm al-Qura interval 90 min (120 in Ramadan via is_ramadan=True)
Qatar interval 90 min

Interval Isha ignores isha_angle (stored as 0.0) and the high-latitude night-fraction caps. The Ramadan 120 is a total, not an additive +30, and applies to the Umm al-Qura preset only — Qatar and angle-based methods are unaffected by the flag.

Some presets add fixed minute offsets on top of the computed times (method_adjustments, distinct from user adjustments):

Preset Offsets
Muslim World League, Egyptian, Karachi, North America, Singapore, JAKIM dhuhr +1
Dubai sunrise -3, dhuhr +3, asr +3, maghrib +3 (see provenance note above)
Moonsighting Committee dhuhr +5, maghrib +3
Kuwait, Umm al-Qura, Qatar, UOIF none

User adjustments stack on top of these and are applied before minute-rounding in _rounded_minute.

Unlike other methods, MOON_SIGHTING_COMMITTEE replaces the night-fraction safety caps with season-adjusted twilight curves (1/7-night based, after moonsighting.com): Fajr is capped by season_adjusted_morning_twilight and Isha floored by season_adjusted_evening_twilight. At latitude ≥ 55° the angle-derived Fajr/Isha are additionally replaced by 1/7-of-night estimates before the seasonal cap is applied. Elsewhere the angle computation stands unless it breaches the seasonal cap.

from alfalak import PrayerTimes, CalculationMethod
prayer_times = PrayerTimes(
coordinates,
datetime.now(),
CalculationMethod.MUSLIM_WORLD_LEAGUE,
)

Override any method’s defaults with CalculationParameters:

from alfalak import CalculationParameters
params = CalculationParameters(
fajr_angle=18,
isha_angle=17,
isha_interval=0,
)

When you pass both a CalculationMethod and custom parameters to CalculationParameters, the method’s built-in values take precedence:

# fajr_angle=12 is ignored because MOON_SIGHTING_COMMITTEE sets it to 18
params = CalculationParameters(
fajr_angle=12,
method=CalculationMethod.MOON_SIGHTING_COMMITTEE,
)
print(params.fajr_angle) # 18.0