-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect Isha timing in Milton Canada #78
Comments
@horus1963 Could you please provide a fiddle to ease the tests + the expected result (and its origin) and finally the reason why you consider the result produced by |
Basically, I was comparing the timing for Isha generated by adhan.js (which I installed using npm) when using the moonsighting committee calculation method to that generated by the originator of the moonsighting committee method on moonsighting.com and found a discrepancy. For example for today (Dec 20th 2021), adhan.js reports that isha is at 18:20 whilst on moonsighting.com it is reported as 18:01. Since both should be using the same algorithm, I expect them to be identical. For both the location is as above (43.494,-79.844). Maybe, Khaled at moonsighting.com updated the algorithm since you last adopted it? I have attached a zip of a json of the prayer times generated for my location by moonsighting.com in case it helps with your investigation. Also I am sorry but I do not know what a fiddle is or how to provide it? |
@horus1963 Thanks for the precision, I accordingly created this to make it clear https://codesandbox.io/s/wild-resonance-p6ofe?file=/src/index.js:226-227 @z3bi I think we're missing something with the If we follow the official Github referred to by moonsighting.com (https://github.com/islamic-network/prayer-times-moonsighting), we are redirected to the following code in which we can see how they make use of this parameter : https://github.com/islamic-network/prayer-times-moonsighting/tree/master/src/MoonSighting Last but not least, according to the https://moonsighting.com/how-we.html page, in which they are explaining how they are calculating the prayers times, it seems that they have really fine-grained/empirical rules depending on the latitudes. So this is unfortunately not a surprise that we are obtaining quite different time values without these adjustments. I'm not sure how often the moonsighting method evolves, but if that's not really frequent, definitely, we should consider to implement it their way. |
I created this other sandbox, with an implementation class and I'm having pretty closer results, that seems to be the way to go. I'm not sure where does the 3-minute Isha offset time is coming from though . @z3bi If you could please take a look https://codesandbox.io/s/affectionate-shaw-5bu5w?file=/src/index.js If we're good to go with this way the following steps will need to be taken :
|
@horus1963 thank you for bringing up this issue, this is an area of the moonsighting method that I've been meaning to implement. @korbav jazakallah for the proof of concept. I think we would probably want to add a shafaq property to the CalculationParameters object (and document that it is only used for MoonsightingCommittee). I'm not sure why you're getting a 3 minute difference but I will look into that. I have a document from Khalid Shaukat explaining all the calculations. I will go back and reference that document so that we can add this new parameter. |
Thank you, that sounds great, let me know if I can help. |
@korbav on my end I'm not getting that three minute difference. InshAllah I will clean up the change and get it ready for a PR. Thank you for the offer to help, I would definitely appreciate a review to double check my work. |
@z3bi Just to be sure, you mean you don't have this offset with your own implementation or with the above sandbox? |
Sorry, I meant with my own implementation. |
No worries, it makes sense then, glad that it works flawlessly! |
Adds a new property to calculation parameters `shafaq` that is used by the MoonsightingCommittee method to calculate Isha. Fixes #78
PR is now available #79 |
Adds a new property to calculation parameters `shafaq` that is used by the MoonsightingCommittee method to calculate Isha. Fixes #78
Adds a new property to calculation parameters `shafaq` that is used by the MoonsightingCommittee method to calculate Isha. Fixes #78
# [4.3.0](v4.2.1...v4.3.0) (2021-12-24) ### Features * **calculation params:** adds shafaq parameter ([4c62bdf](4c62bdf)), closes [#78](#78)
🎉 This issue has been resolved in version 4.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thank you very much! Will the guidance apps be updated as well. I own both of the mac and ios versions. |
@horus1963 adding the options to Guidance will take a bit more work. I'm curious what masjid is using the Shafaq Ahmer values for Isha in Milton Canada? |
Being of mixed ethnicities, there is no consensus between the masjids unfortunately. Some follow the Fiqh council of North America, others don't. Some are Hanafi, others are Shafi, etc. So some mosques follow the Moonsighting Committee whilst others do not want to change from the old North American Method. Therefore we have multiple prayer times, even in the same city. This is very confusing to Muslims, let alone non-Muslims. We do not pray at the same time, nor do we fast at the same time either. Personally, I follow the Shafi school of thought and was taught to follow Shafaq Ahmar. Most Masjids in Milton have Imams originally from Pakistan. They follow the Hanafi School of thought, so they will use Abyad. Some others will use the recommended Shafaq general (recommended by Moonsighting committee). Having said that, they all are usually very flexible and let us pray at the times our school of thought permit. A congregation within a congregation. |
@horus1963 thank you for that explanation, I think having the ability to specify a shafaq type would be useful as an advanced feature but will continue to use the general shafaq as the default value. I will work on adding it to Guidance soon inshAllah. |
Isha timing from adhan.js is different from that from moonsighting.com when selecting the moonsighting.com method. From the site Isha is at 17:59 for Milton (43.494,-79.844) compared to 18:18 from adhan.js. All other timings match exactly.
The text was updated successfully, but these errors were encountered: