Closed AlGantori closed 4 years ago
Salaam. The code for the web app is available here: https://github.com/islamic-network/aladhan.com.
There is an adjustment parameter in the API - the app uses that. It's set here https://github.com/islamic-network/aladhan.com/blob/master/src/dependencies.php#L33 when the application bootstraps.
So I looked at the link and could not make sense of this php function returning 1? (sorry I am not that familiar with php/JS).
$container['gToHAdjustment'] = function($c) {
return 1;
};
I could not figure out what is meant by "There is an adjustment parameter in the API - the app uses that"
Could you please elaborate. Thank you.
If you see https://aladhan.com/prayer-times-api#GetTimings for instance, the API takes a parameter called adjustment, which adjusts the hijri date by the number of days passed to adjustment.
The app passes one for this parameter each time it calls the API - that's why it's date is 1 day a head of the API response you are seeing.
If this link is using an adjustment https://aladhan.com/play/Los%20Angeles/CA,%20USA it is not exposing it.
The bottom-line the displayed "18 Ramadan" is wrong according to our fasting in this timezone May 10th corresponds to 17 Ramadan and that's what the other calendars are displaying, not 18 Ramadan.
This is link is correct
https://aladhan.com/ramadan-prayer-times/2020/Los%20Angeles/CA,%20USA
The app does not expose API variables in the URL - it does not need to.
If that was the problem it would have been helpful to mention that earlier on - you will notice the problem is consistent across the app - like https://aladhan.com/gregorian-hijri-calendar, for instance.
I will change the adjustment to 0 and the issue will go away in 5 mins or so.
The following URL displays day as 17
whereas the API returns 16
What am I missing?
BTW, where is the source for /play/ located ?
Thank you.