quran-meta
Version:
Library with meta data and functionality related to Holy Quran
18 lines (16 loc) • 638 B
JavaScript
import { getRubAlHizb } from "./getRubAlHizb.mjs";
//#region src/getThumunAlHizb.ts
/**
* Retrieves the basic metadata for a specific Eighth (thumun' al-hizb) of the Quran.
*
* @param eighthIndex - The index of the Eighth (thumun' al-hizb) to retrieve metadata for, where 1 is the first quarter.
* @returns An object containing the metadata for the specified quarter, including the juz' (part), hizb (section), and the quarter (rub' al-hizb) index.
*/
function getThumunAlHizb(eighthIndex) {
return {
...getRubAlHizb(Math.floor((eighthIndex - 1) / 2) + 1),
thumunAlHizbId: eighthIndex
};
}
//#endregion
export { getThumunAlHizb };