-
Notifications
You must be signed in to change notification settings - Fork 33
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
Missing Ramadan days with adjustment #53
Comments
@Roaa94 The Hijri date is is a pure mathematical calculation. The adjustment endpoint is stable (it always does the same thing), it's just not what you are after, and it can't be accomplished the way you want it for complicated reasons (primarily because we cannot mathematically be sure when a month ends or begins in the Islamic calendar and in which country). I'll explain this in more detail in a response later (it may be tomorrow), but to get you going, see the code on https://github.com/islamic-network/aladhan.com/blob/cca09de4a67828ee5636b9dc4ad5fb16bcad0682/routes/ramadan.php#L17. This page generates https://aladhan.com/ramadan-prayer-times/2022/Istanbul/Turkey, for instance. |
I am also facing a similar issue in which September 6, 2024 is showing up as the final day safar and the first day of rabi alawwal simultaneously when adjustment is set to 1. |
Noted @AnwarAMusa. |
@Roaa94 @AnwarAMusa I've made a fix for this (44faac3). It's not perfect, but please do try it out. This is, nonetheless, temporary as in January we will use the new library at https://github.com/islamic-network/islamic-calendar which will support the current calculation as well as astronomical calculations from Umm al Qura and Diyanet. Stay tuned. |
The Hijri calendar in the
calendar
endpoint is not correct.1st day of Ramadan should be on April 2nd, however it's on April 4th.
I used the
adjustment=2
param to get Ramadan 1st to be on April 2nd. But Ramadan 2nd was missing from the response. It jumps directly from Ramadan 1st to Ramadan 3rd. So now instead of April 3rd being Ramadan 2nd, it's Ramadan 3rd.Endpoint:
https://api.aladhan.com/v1/calendar
Params:
latitude: 41.017153708870126
longitude: 28.977153766843355
method: 13
month: 4
adjustment: 2
Full route:
https://api.aladhan.com/v1/calendar?latitude=41.017153708870126&longitude=28.977153766843355&method=13&month=4&iso8601=true&adjustment=2
Response: (Ramadan 2nd is missing):
When I do
adjustment=1
, Ramadan 1st is missing from the response, but I'm able to have April 3rd correspond to Ramadan 2nd.But in any case, ideally I would want the
adjustment
param to be stable so I can ship the app and not have to upload a new build to change it.The text was updated successfully, but these errors were encountered: