quran-meta
Version:
Library with meta data and functionality related to Holy Quran
17 lines (16 loc) • 414 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getRubAlHizbMeta = getRubAlHizbMeta;
function getRubAlHizbMeta(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
};
}