High Latitude Rules
High Latitude Rules
Section titled “High Latitude Rules”At high latitudes, summer nights can be very short, making it difficult to determine Fajr and Isha times. Al-Falak provides three rules for these situations.
HighLatitudeRule options
Section titled “HighLatitudeRule options”| Rule | Behavior |
|---|---|
MIDDLE_OF_THE_NIGHT |
Fajr never earlier than middle of night, Isha never later (default) |
SEVENTH_OF_THE_NIGHT |
Fajr never earlier than start of last seventh, Isha never later than end of first seventh |
TWILIGHT_ANGLE |
Uses fajr_angle/60 and isha_angle/60 as night fractions |
Using a high latitude rule
Section titled “Using a high latitude rule”from datetime import datetime
from alfalak import ( CalculationMethod, CalculationParameters, HighLatitudeRule, PrayerTimes,)
params = CalculationParameters(method=CalculationMethod.MUSLIM_WORLD_LEAGUE)params.high_latitude_rule = HighLatitudeRule.MIDDLE_OF_THE_NIGHTprayer_times = PrayerTimes( (51.5074, -0.1278), # London datetime.now(), calculation_parameters=params,)MIDDLE_OF_THE_NIGHT (default)
Section titled “MIDDLE_OF_THE_NIGHT (default)”The night is split in half. Fajr cannot be earlier than the midpoint between sunset and sunrise, and Isha cannot be later than that midpoint.
SEVENTH_OF_THE_NIGHT
Section titled “SEVENTH_OF_THE_NIGHT”The night is split into sevenths. Fajr cannot be earlier than the start of the last seventh, and Isha cannot be later than the end of the first seventh.
TWILIGHT_ANGLE
Section titled “TWILIGHT_ANGLE”Similar to seventh-of-the-night, but uses the Fajr and Isha angles divided by 60 as the night fraction. For example, with a Fajr angle of 18°, the fraction is 18/60 = 0.3 (30% of the night).
When to use these rules
Section titled “When to use these rules”These rules are most relevant for locations above ~48° latitude during summer months:
| Latitude | Example locations |
|---|---|
| 48°–55° | Paris, Berlin, Kyiv, London |
| 55°–60° | Copenhagen, Oslo, Stockholm, St. Petersburg |
| 60°+ | Helsinki, Reykjavik, Anchorage, Longyearbyen |
Interaction with Moonsighting Committee and polar fallback
Section titled “Interaction with Moonsighting Committee and polar fallback”- These caps apply to every method, but
MOON_SIGHTING_COMMITTEEdoes not use them: it substitutes its own seasonal-twilight caps (see Calculation Methods — MSC section). - Interval Isha (Umm al-Qura, Qatar) bypasses the Isha cap entirely:
maghrib + intervalis used as-is. - Order of operations:
PolarCircleRuleresolution runs first (no-op on normal days). Only afterwards do these night-fraction caps clamp Fajr/Isha. Near the polar boundary the Asr clamps (asr = dhuhrwhen the shadow angle is unreachable,asr = maghribwhen it spills past sunset) can also engage.
High-latitude risk note
Section titled “High-latitude risk note”Locations near or above 60° latitude can experience polar day/night periods and
very short twilight windows. The choice of PolarCircleRule and
HighLatitudeRule has a significant impact on calculated times; verify results
against authoritative local sources when operating in these regions.
See Timezone Handling for details on deterministic timezone database behavior in tests and CI.
See also
Section titled “See also”- Timezone Handling — DST and timezone considerations
- Polar Regions — handling polar day/night
- Calculation Methods — method-specific defaults