api.alquran.cloud
api.alquran.cloud copied to clipboard
Some Juz(es) are offset by either 1 or -1
Examples:
// from meta
Juz 4 should start at {"surah":3,"ayah":92} instead of {"surah":3,"ayah":93} (-1 offset)
Juz 5 should start at {"surah":5,"ayah":83} instead of {"surah":5,"ayah":82} (+1 offset)
Thank you @Cyberistic. The API matches what is on https://en.wikipedia.org/wiki/Juz%27. Do you have access to another digital source - I can't find one and short of manually checking multiple printed Qur'ans I don't really see another option to verify this.
Examples:
// from meta
Juz 4 should start at {"surah":3,"ayah":92} instead of {"surah":3,"ayah":93} (-1 offset)
Juz 5 should start at {"surah":5,"ayah":83} instead of {"surah":5,"ayah":82} (+1 offset)
Just for reference, the second one is Juz 7, not 5.
Using your API:
data.surahs[3].ayahs[92].page
// returns 62
data.surahs[3].ayahs[92].juz
// returns 3
data.surahs[3].ayahs[93].page
// returns 62
data.surahs[3].ayahs[92].juz
// returns 4
Two ayahs in the same page can't be in different Juz-es. Other than using your DB to check for the first ayah in the first page of each Juz, I'm not sure how this could be confirmed.
I used my own personal Quran to verify what I stated in my original issue.
Just for reference, the second one is Juz 7, not 5.
Whoops, sorry.
EDIT: Apparently Juz-es don't always start at the top of the page? never knew.
Keeping this open as requested by @meezaan