Skip to content
MyPrayerTimes is a simple Module, that calculate prayer times for any location around the world, based on a variety of calculation methods currently used in Muslim communities using the Aladhan API
JavaScript CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
MMM-MyPrayerTimes.css
MMM-MyPrayerTimes.js
README.md
node_helper.js
package.json
screenshot.png

README.md

MMM-MyPrayerTimes

MyPrayerTimes is a simple Module, that calculates the prayer times for any location around the world, based on a variety of calculation methods currently used in Muslim communities using the Aladhan API

Screenshot

Installation

Clone this repository in your modules folder, and install dependencies:

cd ~/MagicMirror/modules 
git clone https://github.com/htilburgs/MMM-MyPrayerTimes
cd MMM-MyPrayerTimes
npm install 

Configuration

Go to the MagicMirror/config directory and edit the config.js file. Add the module to your modules array in your config.js.

{
  module: 'MMM-MyPrayerTimes',
  position: 'top_left',
  header: 'My Prayer Times',
  config: {
          mptLat: null,			// Replace with the latitude of your location
	  mptLon: null,			// Replace with the Longitude of your location
	  mptMethode: 3,		// Which calculation methode is used, see options below
	  showSunrise: true,		// Display Sunrise, false if you want to hide
	  showSunset: true,		// Display Sunset, false if you want to hide
	  showMidnight: true,		// Display Midnight, false if you want to hide
	  showImsak: true,		// Display Imsak, false if you want to hide
	  show24Clock: true,		// Default display 24hour clock -> false is 12hour (AM/PM) clock
	  }
},

To get your latitude and longitude, you can go to https://latitudelongitude.org

Module configuration

Here is the documentation of options for the modules configuration:

Option Description
mptLat The latitude of your location for a correct calculation

Number
Default: null
mptLon The longitude of your location for a correct calculation

Number
Default: null
mptMethod Kind of calculation method to use

Default: Number
Possible values:
  • 0 - Shia Ithna-Ansari
  • 1 - University of Islamic Sciences, Karachi
  • 2 - Islamic Society of North America
  • 3 - Muslim World League
  • 4 - Umm Al-Qura University, Makkah
  • 5 - Egyptian General Authority of Survey
  • 7 - Institute of Geophysics, University of Tehran
  • 8 - Gulf Region
  • 9 - Kuwait
  • 10 - Qatar
  • 11 - Majlis Ugama Islam Singapura, Singapore
  • 12 - Union Organization islamic de France
  • 13 - Diyanet İşleri Başkanlığı, Turkey
  • 99 - Custom. See https://aladhan.com/calculation-methods
  • showSunrise Shows Sunrise in the Prayer Times

    True / False
    Default: true
    showSunset Shows Sunset in the Prayer Times

    True / False
    Default: true
    showMidnight Shows Midnight in the Prayer Times

    True / False
    Default: true
    showImsak Shows Imsak in the Prayer Times

    True / False
    Default: true
    show24Clock Show Prayer Times in 12hour (AM/PM) or 24hour format

    True / False
    Default: true

    License

    The MIT License (MIT)

    Copyright © 2019 Harm Tilburgs

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    The software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

    You can’t perform that action at this time.