batoulapps / Adhan

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

Which madhab (Hanafi / Safi for Asr calculation) to use with a particular calculation method #105

Closed skkshoaib closed 1 year ago

skkshoaib commented 1 year ago

Salaam

I am quite confused about which asr calculation madhab to use.

I see that CalculationMethod (MUSLIM_WORLD_LEAGUE,UMM_AL_QURA...) doesn't by default include madhab but rather all of them default to sahfi. Does it mean that calculation method and madhab have no association?

Similarly for HighLatitudeRule. Is there no association between Calculation Method and HighLatitudeRule?

JazakAllah khairun

z3bi commented 1 year ago

@skkshoaib the idea behind this is that the calculation method is an established fact that at a specific location, the appearance and disappearance of twilight correlates with a specific angle below the horizon. This is something that we categorize as being more science based than anything else.

For Asr prayer, this is an option based on what madhab the user follows and cannot be tied to a region. While you as a developer might choose to make an assumption that if the user's location is in Pakistan that the madhab will be Hanafi, as a developer of the library I am choosing not to encode that assumption as I'm sure there are people in Pakistan who choose to follow the Shafi madhab.

Likewise for high latitude rule, whether or not to apply the high latitude rule and which rule to use is a form of rukhsa that is applied depending on the amount of hardship the individual would have trying to observe prayer times without the rule. We have provided functions to encode when the rule should be applied (at 48 degrees latitude example). But because this is a rhuksa applied to locations that have extreme sunset/sunrise times it is not possible to associate it directly with a calculation method.

skkshoaib commented 1 year ago

JazakAllah khairun for the reply.

Closing it.