/QuranSafahat

This Quran Safahat calculator accurately computes the number of pages, including any extra lines, between two specific points in the Holy Quran (Maqta'), starting from a surah, ayah and ending at another.

Primary LanguagePHP

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