Function findManzilByAyahId

  • Finds the Manzil number for a given Ayah ID using binary search. A Manzil is one of seven approximately equal divisions of the Quran.

    Parameters

    • ayahId: number

      The ID of the Ayah to find the Manzil for

    Returns Manzil

    The Manzil number (1-7) containing the specified Ayah

    If the provided Ayah ID is invalid

    const manzil = findManzilByAyahId(2345); // Returns the Manzil containing Ayah 2345