Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 1.48 KB

README.md

File metadata and controls

29 lines (18 loc) · 1.48 KB

shoreltime (Shalat's Relative-Time)

How close are we to the next adzan?

alt text

61 means "61% percent completion" from the last adzan to the next adzan.

Installation Guide (Windows)

  1. Install Python 3
  2. Open the source code
  3. Modify the coordinate and timezone based on your location. lamd : longitude, phi : latitude, td : UTC offset (i.e. 7,-5)
  4. Open command prompt, type pip install pystray. Then pip install Pillow
  5. Rename sy.py to sy.pyw
  6. Press WIN+R, type "shell:startup". Right click, new, shortcut. Point it to where sy.pyw is located.
  7. Double click the sy.pyw

Algorithm

The prayer times calculation algorithm is based from Djamaluddin (1990) by using solar position algorithm of Astronomical Almanac for Computer.

Then, today's prayer times (+ midnight time) is stored inside an array. checkpoints = [subuh,zuhur,ashar,magrib,isya,midnight].

If right now is 14.00 , then we calculate the time difference between 14.00 and zuhur progress = now - zuhur, calculate the time difference between zuhur and ashar complete_progress = ashar - zuhur, calculate the progress (in percent) percentageProgress = (progress / complete_progress) * 100.

Notes

Only works for regions between latitude 65 N - 65 S