B4A Library Muslim Prayer Time

Hello all ,

This is a not complete port of this project itl-java . I might add more features when I have time .


Notice : It is considered beta . Please test and tell us how accurate it is .

Example :


B4X:
        Dim smm As SMMPrayTime
    smm.Initialize

    Dim l As List =smm.GetLocationTimes(51.4800, 0.0000,0,DateTime.Now,0 , smm.NORTH_AMERICA )
    For index = 0 To l.Size-1
        Log(l.Get(index))
    Next



Documentation :




SMMPrayTimes
Author:
SMM
Version: 0.02
  • SMMPrayTime
    Methods:
    • GetLocationTimes (lat As Double, lon As Double, GMTdiffernce As Double, date As Long, daysaving As Int, method As String) As List
      Returns prayer and sunrise times as list (Fajr,Sunrise,Duhur,Asr,Maghrib,Isha) for specific location
      Lat latitude in degrees
      Lon longitude in degrees
      GMTdiffernce hours difference from GMT
      day saving time (1 to add one hour, 2 to add two, 0
      method : Method used for times calculation like UMM_ALQURRA .. You can use library properties
    • Initialize
    • IsInitialized As Boolean
    Properties:
    • EGYPT_SURVEY As String [read only]
    • FIXED_ISHAA As String [read only]
    • KARACHI_HANAF As String [read only]
    • KARACHI_SHAF As String [read only]
    • MUSLIM_LEAGUE As String [read only]
    • NONE As String [read only]
    • NORTH_AMERICA As String [read only]
    • UMM_ALQURRA As String [read only]

fix : GMTdiffernce is now a double.
 

Attachments

  • SMMPrayTimes.zip
    39.7 KB · Views: 378
  • SMMPrayTimes0.04.zip
    39.8 KB · Views: 366
Last edited:

Ohanian

Active Member
Licensed User
Longtime User
Hi,

I think GMTdiffernce should be double. (for instance Tehran is 3 hours and 30 minutes ahead of Greenwich Mean Time > +3.5)
 

Ohanian

Active Member
Licensed User
Longtime User
Hi,

Here's the result :

B4X:
Dim l As List = smm.GetLocationTimes(35.657296, 51.421509, 3, DateTime.Now, 0, smm.KARACHI_SHAF)

4:59:00
6:30:00
11:26:00
14:03:00
16:21:00
17:52:00

and

B4X:
Dim l As List = smm.GetLocationTimes(35.657296, 51.421509, 3.5, DateTime.Now, 0, smm.KARACHI_SHAF)

4:59:00
6:30:00
11:26:00
14:03:00
16:21:00
17:52:00

As you can see there is no difference when i change GMTdiffernce value from 3 to 3.5.
 

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Hi,

Here's the result :

B4X:
Dim l As List = smm.GetLocationTimes(35.657296, 51.421509, 3, DateTime.Now, 0, smm.KARACHI_SHAF)

4:59:00
6:30:00
11:26:00
14:03:00
16:21:00
17:52:00

and

B4X:
Dim l As List = smm.GetLocationTimes(35.657296, 51.421509, 3.5, DateTime.Now, 0, smm.KARACHI_SHAF)

4:59:00
6:30:00
11:26:00
14:03:00
16:21:00
17:52:00

As you can see there is no difference when i change GMTdiffernce value from 3 to 3.5.

Sorry for that . I am inspecting this error .
 

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Hi,

Here's the result :

B4X:
Dim l As List = smm.GetLocationTimes(35.657296, 51.421509, 3, DateTime.Now, 0, smm.KARACHI_SHAF)

4:59:00
6:30:00
11:26:00
14:03:00
16:21:00
17:52:00

and

B4X:
Dim l As List = smm.GetLocationTimes(35.657296, 51.421509, 3.5, DateTime.Now, 0, smm.KARACHI_SHAF)

4:59:00
6:30:00
11:26:00
14:03:00
16:21:00
17:52:00

As you can see there is no difference when i change GMTdiffernce value from 3 to 3.5.

Stupid me :)
Now it should work .
 

thinktank

Member
is there any chance to update this library to perform other functions like: hijri calculator, qibla direction etc. Prayer time seems to be working fine. Thanx in advance...
 
Top