osamz/quran-safahat

Holy Quran calculator that help to calculate pages between two Ayah.

1.0.0 2023-03-21 14:59 UTC

This package is auto-updated.

Last update: 2025-07-21 20:06:21 UTC


README

License Tests Coverage GitHub tag (latest by date)

للنسخة العربية انقر هنا

Quran Safahat

This library calculates length of Quran Clip (Makta') (مقطع) the pages from point (ayah, surah) to another.

Installation

composer require osamz/quran-safahat

Usage

$startAya = $helper->getCheckedAyaPoint("النازعات", 17);
$endAya =   $helper->getCheckedAyaPoint("المرسلات", 50);

$clip =   new QuranClip($startAya, $endAya);

$quran =  new QuranNaskhEdition($quranData);

$quranCalculator = new QuranCalculator($quran);

$clipSize = $quranCalculator->calculate($clip);
echo "Pages: $clipSize->pages, and $clipSize->lines lines.";
// Pages: 4, and 1 lines.

see: examples folder for detailed example.

License

GPL-3.0-only

Authors