islamic-network / prayer-times

An Islamic Prayer Times Library written in PHP. It performs the core calculations for the AlAdhan API @ https://aladhan.com.

Home Page:https://islamic.network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why to adjust for high latitudes if times determination is already possible?

maherahmed opened this issue · comments

AlsalamuAlykom,

if (is_nan($time) || $timeDiff > $portion) {

Here it applies the high latitude adjustment if for example the time between Fajr and sunrise is greater than the night portion, should not the high latitude adjustment only applied if the times determination according to the calculation method respective angles is not possible?

This line was also committed 8 years ago, but I believe this was done because without the adjustment a NaN value was produced for the time. I don't remember why, exactly (I'd have to follow the whole calculation through now to get there), but yes, the calculation was not possible, and if I recall correctly, the problem existed in the original library too.