quran-meta
Version:
Library with meta data and functionality related to Holy Quran
17 lines (16 loc) • 402 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getRubAlHizb = getRubAlHizb;
function getRubAlHizb(quarterIndex) {
const juz = Math.floor((quarterIndex - 1) / 8) + 1;
const hizbIndex = Math.floor((quarterIndex - 1) / 4) + 1;
const juzPart = quarterIndex % 8 || 8;
return {
juz,
hizbId: hizbIndex,
juzPart,
rubAlHizbId: quarterIndex
};
}