UNPKG

salat-first

Version:

Islamic prayer times calculation with special support for Moroccan methods and Maliki madhab

48 lines (47 loc) 1.92 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MoroccanHabousInfo = void 0; exports.getMoroccanHabousParameters = getMoroccanHabousParameters; const index_1 = require("./index"); const calculator_1 = require("../prayers/calculator"); const madhab_1 = require("../madhab"); const formatting_1 = require("../utils/formatting"); /** * Creates calculation parameters for the Moroccan Habous method * @returns The calculation parameters */ function getMoroccanHabousParameters() { // Create parameters with Moroccan Habous angles const params = new calculator_1.CalculationParameters(index_1.CalculationMethod.MoroccanHabous, // Method name 19.1, // Fajr angle (19 degrees) 17, // Isha angle (17 degrees) 0, // No Isha interval 0 // No Maghrib angle ); // Set Maliki madhab as default for Morocco params.madhab = madhab_1.Madhab.Maliki; // Set method-specific adjustments (in minutes) params.methodAdjustments = { fajr: -4, // Fajr time is showing ~7 min too late sunrise: -8, // Sunrise showing ~8 min too late dhuhr: -3, // Dhuhr is showing ~3 min too late asr: -3, // Asr is showing ~3 min too late maghrib: -26, // Maghrib is showing ~26 min too late! isha: -1, // Isha is showing ~1 min too late }; // Use nearest minute rounding params.rounding = formatting_1.Rounding.Nearest; return params; } /** * Information about the Moroccan Habous method */ exports.MoroccanHabousInfo = { name: "Moroccan Ministry of Habous and Islamic Affairs", description: "Official prayer time calculation method used in Morocco, optimized for Morocco and North Africa", region: "North Africa, West Africa", defaultMadhab: madhab_1.Madhab.Maliki, fajrAngle: 19.1, ishaAngle: 17, source: "Ministry of Habous and Islamic Affairs of the Kingdom of Morocco", };