-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add Diyanet İşleri Başkanlığı as a calculation method #23
Comments
We would love to. Do you have a reference for how they do their calculation? |
If it helps, their prayer time calculator is available online here. |
@khalid-hussain thank you |
But I can't really find resources about how they calculate, I want to build an adhan app and try to provide the most calculation methods as possible |
This seems like it may be an explanation for the Diyanet method http://www.namazvakti.com/en.1.pdf I will try to add the calculations into our next version |
@z3bi, I too came across this but was/am not sure of its authenticity. |
We can use times from http://takvim.diyanet.gov.tr/en-US/PrayerTimes to create an automated test for the method so we can validate the method before merging it in. |
Scanning the source of the calculator I posted, the |
That javascript function is loading the data from an ajax call, so the calculation is being done server side. Perhaps someone who knows Turkish could contact them and ask for more information on how prayer times are calculated? |
I could do that |
I maybe found a book... I will go through and let you guys know :) |
I mean Fajr at 7 pm ? :D |
Adhan provides NSDate objects which have a time set in UTC, when formatting the times make sure to use the correct timezone for your formatter. |
If thats not the issue please post the code you used to get those times |
it is the javascript example, just insert my coordinates |
In the JS example, the function |
Oh, I live in CET |
But 1:15 am is still wrong |
I'm also guessing you are using a location thats somewhat far north, try setting another High Latitude Rule.
|
Ok thank you :) |
But how can I automatically read that out ? |
Which rule I have to use... |
Also it was TwilightAngle... |
One of the next things we hope to add is a function to give the recommended calculation parameters for a location. The difficult thing is theres no official source for which high latitude rule to use, they're just different ways to approximate prayer times in places with unreasonable twilight times. |
@telip007 any update on the book? |
I did found a calculation method in a another source code, and it is running but not 100% the same as diyanet, asr and isha times are different... |
And fajr times |
You can read it in Adhan.swift :) |
I tested it over 14 days and it is functioning very well, even for other cities... |
Would it be possible for you to add JSON file with your tests? You can see examples in https://github.com/batoulapps/Adhan/tree/master/Times |
I will do it later InshALLAH, now it is Iftar time here :) |
Hey man, sorry had a lot to do... I hope I can do it today :) |
Assalamo alaikom, any updates with this? |
@meltuhamy it seems we never landed on an authentic source describing how the Diyanet calculation method works. It may be worthwhile attempting to use the description in the PDF mentioned above but it does seem like a significant effort as it is not simply different twilight angles like other methods. As such, I was really hoping for a more authentic source before investing the time and effort. I still think if someone speaks Turkish it's probably worth contacting the people at http://takvim.diyanet.gov.tr/ and asking them for more information. |
I tried contacting them several weeks ago, but of course no response. Just bumping this up in case anyone had any updates or other ideas. |
@basememara I'm willing to sit down and go through the PDF and find what makes this method different, but it would be very helpful if someone used the times in the official site to create a json timetable file for our unit tests so I could compare against that as I worked. |
Ok I've attached the json test cases for several cities along with the results from the However, note that because the site uses country/city and the unit tests are coordinates, there will be a margin of difference since the unit tests are more precise. Also, I assumed |
Thank you so much for doing this, if you could modify the tests slightly. I prefer to do at least one day for every month. Just something to make sure we're covering winter and summer months as they can have very different prayer times. |
Good idea 👍 Unfortunately, the Anyone know another official or reliable place to get these prayer times for specific dates? |
Just a heads up these are way off, doesn't match the Turkish gov results: https://www.muslimpro.com/en/search?coordinates=51.5073509%2C-0.12775829999998223&country_code=GB&country_name=United+Kingdom&city_name=London&date=&convention=Diyanet&asrjuristic=Standard&highlat=MiddleNight |
Assalamu aleykum! |
@Al-Muhandis a fajr angle of 18 and an isha angle of 17 works throughout the year? Would it be possible to contribute a test json file, you can see other ones here https://github.com/batoulapps/Adhan/tree/master/Times |
@z3bi unfortunately, I do not know how to see what their schedule (http://takvim.diyanet.gov.tr/en-US/PrayerTimes) is for the whole year. Besides, I did not calculate using your code, but with my code and even in another language, but I think the difference should not be significant. |
@Al-Muhandis thank you for the explanation. My (somewhat limited) understanding of the Diyanet method is that it you can't replicate it by taking existing angle based calculation methods and then finding the correct angle. You might find an angle that works for today, but that same angle in a few months from now would produce incorrect times. |
@z3bi I understand what you mean. I myself came across similar methods (rather their absence) for some mosques. If it could see the time of prayer for the whole year, I would try to check |
According to this library, it's using these offsets for its "Diyanet İşleri Başkanlığı" calculation:
Seems to match closely with the official site. Not sure how Muslim Pro is able to get so close unless it's using offsets too. |
Can you post your results when you use these offsets? Expected from the official site and what you get? |
Using these parameters:
I got these values for coordinates latitude: 41.040725, longitude: 28.660019 (comparing against Turkey, Istanbul, Esenyurt District) 2019-08-06
2019-09-05
These look promising but to verify we need the official times for a full year, I don't seem to see the option for that on the official website. |
I found a website with the official prayer times that and the date in the URL can be changed to get the prayer times for any day https://www.yenisafak.com/en/ankara-prayer-times-01.8.2019 I am going to put together a sampling of data for the year and see how it performs with the parameters we have tried so far. |
Ok so I tweaked the parameters again, this is the closest I can get it.
I feel like this is close enough to include it. I'll start work on adding it to all the different implementations of the library. |
Stale issue message |
Assalamu aleykum, is it possible to add Diyanet İşleri Başkanlığı as a calculation method ? :)
The text was updated successfully, but these errors were encountered: