Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

salat-first

elkhiari94MIT1.0.4TypeScript support: included

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

islam, prayer, salat, times, morocco, maliki, madhab, qibla, asr, fajr, habous

readme

Prayer Times

A comprehensive Islamic prayer times calculation package with special support for Moroccan methods and Maliki madhab.

Features

  • Accurate prayer time calculations based on location and date
  • Specialized support for Moroccan Habous method (default)
  • Support for different madhabs with proper Asr calculation:
    • Maliki (default for Moroccan method)
    • Shafi
    • Hanafi
    • Hanbali
  • Multiple calculation methods including:
    • Muslim World League
    • Egyptian
    • Karachi (University of Islamic Sciences)
    • Umm al-Qura
    • Dubai
    • Moonsighting Committee
    • North America (ISNA)
    • Kuwait
    • Qatar
    • Singapore
    • Tehran
    • Turkey
  • Additional features:
    • Qibla direction calculation
    • Sunnah times (middle and last third of night)
    • Time formatting utilities
    • High latitude adjustment methods
    • Web widget for easy integration

Installation

npm install prayer-times

Using the Web Widget

Include the package in your HTML:

<script src="node_modules/prayer-times/dist/bundle.js"></script>

<div id="prayer-times"></div>

<script>
  const widget = new PrayerTimesWidget('prayer-times', {
    latitude: 33.5731,
    longitude: -7.5898,
    method: 'MoroccanHabous',
    language: 'ar', // 'en', 'ar', or 'fr'
    timeFormat: 'hour12' // 'hour12' or 'hour24'
  });
</script>