Function findJuzAndShift

  • Finds the juz (section) that contains the specified ayah (verse) and calculates the number of ayahs between the start of the juz and the start of the surah (chapter) that contains the ayah.

    Parameters

    • surah: Surah

      The surah (chapter) that contains the ayah.

    • ayah: AyahNo

      The ayah (verse) number.

    Returns { ayahsBetweenJuzSurah: AyahCountBetweenJuzSurah; juz: Juz; leftAyahId: number }

    An object containing the following properties:

    • juz: The juz (section) that contains the ayah.
    • leftAyahId: The ayah ID of the first ayah in the juz.
    • ayahsBetweenJuzSurah: The number of ayahs between the start of the juz and the start of the surah (positive if the surah starts is in the juz, negative if the surah starts before the juz).