Prayer Times provides a set of handy functions to calculate prayer times for any location around the world, based on a variety of calculation methods currently used in Muslim communities.
You can report any issue on issues page. Note: If you speak Arabic, you can submit issues with Arabic language and I will check them. :)
Just add this line to your Podfile
pod 'PrayerTimesSwift'
Now run pod install
You will need to create a new instance of PrayerTime
. Once the instance are configured, you can call getPrayerTimes()
.
let myPrayerTime = PrayerTimes(caculationMethod: .makkah, asrJuristic: .shafii, adjustHighLats: .none, timeFormat: .time12)
let prayerTimes = myPrayerTime.getPrayerTimes(date: .current, latitude: 24.7136, longitude: 46.6753, tZone: 3)
TimeFormat
To change the time format to:time24
24-hour formattime12
12-hour formattime12NS
12-hour format with no suffixfloating
floating point number
myPrayerTime.timeFormat = .time24
Caculationmethod
To change the Calculation Methods.karachi
University of Islamic Sciences, Karachiisna
Islamic Society of North America (ISNA)mwl
Muslim World League (MWL)makkah
Umm al-Qura, Makkahegypt
Egyptian General Authority of Surveyjafari
Ithna Asharitehran
Institute of Geophysics, University of Tehrancustom
Custom Setting
myPrayerTime.caculationMethod = .makkah
AsrJuristic
To change Juristic Method for Asrshafii
Shafii (standard)hanafi
Hanafi
myPrayerTime.asrJuristic = .shafii
AdjustHighLats
Adjusting Methods for Higher Latitudesnone
No adjustmentmidNight
middle of nightoneSeventh
1/7th of nightangleBased
angle/60th of night
myPrayerTime.adjustHighLats = .none
tuneTimes
Tune timings for adjustments
myPrayerTime.tuneTimes([0,0,0,0,0,0,0])
Abdullah Alhazmy
PrayerTimesSwift is available under the MIT license. See the LICENSE file for more info.