Islamic Prayer time module.
Kanagaraj
Posts: 7
Hi All,
I Want to write a program for Islamic prayer timings. I need to play the music automatically when the prayer time comes. There are 5 different times in a day and everyday the time will change.
Can anyone guide me on this?
Please share if anyone have module.
Thanks in advance.
I Want to write a program for Islamic prayer timings. I need to play the music automatically when the prayer time comes. There are 5 different times in a day and everyday the time will change.
Can anyone guide me on this?
Please share if anyone have module.
Thanks in advance.
0
Comments
{'05:00:00'}
So a very simple way is to just look for the strings you want.
This code snpet is just for the theory of it. You'll need to decide how you want to implement it in your code...
this should get you started. You can use a variable to dynamically alter the prayer times if you with or just keep them at the exact same time. You'll have to setup the timeline, of course. And like I say, there are any number of ways to approach this. This is just a basic start to get you going.
Thanks for your reply. The main problem i am facing is to pull the 5 different times from the internet. Also its not the same time for everyday .
Please guide me on this.
Thanks.
I'm afraid that I will not be able to share the code with you because I have done it for commercial use, if you wish I can share the module with you but you will need to buy a license for it to have it fully working
the module doesn't use any online services to calculate the times, everything is done locally in the Netlinx master
Please let me know if this works for you
http://praytimes.org/calculation/
http://praytimes.org/wiki/Code
If you are familiar with Julian dates I reckon you could write something in Netlinx.
There's a number of examples in other languages on the wiki page that you could adapt fairly easily too.
Simon
Certainly! Here's a shorter version using Python with the
pygame
library:Replace
'your_music_file.mp3'
with the actual path to your music file. This program continuously checks the current time against predefined prayer timings and plays music when it's time for a prayer. Adjust the prayer timings and customize as needed.