Function findJuzAndShiftByAyahId

  • Finds the Juz number and calculates the shift between Juz start and Surah start for a given Ayah ID

    Parameters

    • ayahId: number

      The unique identifier of an Ayah (verse) in the Quran

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

    An object containing:

    • juz: The Juz number where the Ayah is located
    • leftAyahId: The starting Ayah ID of the Juz
    • ayahsBetweenJuzSurah: The number of Ayahs between the Juz start and the Surah start

    Error If the provided Ayah ID is invalid