batoulapps / Adhan

High precision prayer time library
MIT License
331 stars 63 forks source link

Prohibited prayer times #83

Closed basememara closed 6 years ago

basememara commented 7 years ago

I would like to open up a discussion in adding functionality to calculate prohibited prayer times:

-From dawn until the sun has risen to the height of a spear

-When it is directly overhead at noon until it has passed its zenith

-From Asr prayer until the sun has set completely

I imagine it would be a separate call, such as how SunnahTimes is done, i.e. ProhibitedTimes(from: PrayerTimes).

Hadith and fatwa sources: https://islamqa.info/en/48998 http://daruliftabirmingham.co.uk/the-prohibited-and-disliked-times-for-salah/ http://www.islamweb.net/emainpage/index.php?page=showfatwa&Option=FatwaId&Id=87774 https://abdurrahman.org/2015/01/30/when-is-it-forbidden-to-pray/

z3bi commented 7 years ago

This is a good suggestion, unfortunately prohibited times are even more nuanced than prayer times.

"from dawn until the sun has risen to the height of a spear" - so fajr prayer is from dawn until sunrise, it appears that one is discouraged from offering other sunnah prayers during the time of fajr except for the sunnah of fajr. For the prohibition, it seems one should not pray any prayer after sunrise until it has risen to the height of a spear. This of course brings up the question, what hour angle of the sun corresponds to the height of a spear on the horizon.

"When it is directly overhead at noon until it has passed its zenith" - this is actually a very brief time and doesn't last more than 1 or 2 minutes. By default Adhan adds one minute to the zenith to account for the passing, and the moonsighting committee adds five minutes to be on the cautious side. In any case, the built in times of getting up, calling the adhan, making wudu, calling the iqama, etc. should all ensure that by the time the prayer is performed the sun is no longer at the zenith.

"From Asr prayer until the sun has set completely" - this one appears to mean that after you pray Asr, you are discouraged from offering any additional sunnah prayers until the the sun has set. The more stringent rule appears to be that it is forbidden to pray at all while the sun is in act of setting. Again, this is a brief time as the setting of the sun generally takes about one minute.

Given the nuances and brief durations I had not considered it to be particularly useful to add them, but I'm open to hearing other people's thoughts on the matter.