PrayerTimes 提供了一组方便的函数,可以根据目前在穆斯林社区中使用的各种计算方法,为世界上的任何地方计算祈祷时间。
您可以在问题页面报告任何问题。 注意:如果您会阿拉伯语,您可以用阿拉伯语提交问题,我会检查它们。 :)
只需将 pod 'PrayerTimesSwift'
添加到您的 Podfile 中,然后继续!PrayerTimesSwift 通过 CocoaPods 提供使用。要安装它,只需将以下行添加到您的 Podfile 中
pod "PrayerTimesSwift"
然后运行 pod install
PrayerTime
您需要创建一个 PrayerTime
的新实例。一旦实例配置完成,您就可以调用 getPrayerTimes()
。
let myPrayerTime = PrayerTimes(caculationmethod: .Makkah, asrJuristic: .Shafii, adjustHighLats: .None, timeFormat: .Time12)
let prayerTimes = myPrayerTime.getPrayerTimes(NSCalendar.currentCalendar(), latitude: 24.7993689, longitude:
TimeFormat
将时间格式改为Time24
24小时制Time12
12小时制Time12NS
无后缀的12小时制Floating
浮点数myPrayerTime.timeFormat = .time24
Calculationmethod
更改计算方法。Karachi
加尔各答伊斯兰科学大学,卡拉奇ISNA
美国北伊斯兰协会 (ISNA)MWL
穆斯林世界联盟 (MWL)Makkah
麦加乌姆卡尔ura大学Egypt
埃及总测量局Jafari
雅弗里Tehran
德黑兰地球物理研究所,德黑兰大学Custom
自定义设置 myPrayerTime.Caculationmethod = .makkah
AsrJuristic
改变 Asr 的法规方法Shafii
谢菲伊(标准)Hanafi
赫纳菲myPrayerTime.asrJuristic = .shafii
AdjustHighLats
高纬度的调整方法None
不调整MidNight
半夜OneSeventh
夜的1/7AngleBased
基于60度的角度myPrayerTime.adjustHighLats = .none
tuneTimes
调整时间以进行微调 myPrayerTime.tuneTimes([0,0,0,0,0,0,0])
Abdullah Alhazmy
PrayerTimesSwift 在MIT许可下提供。有关更多信息,请参阅LICENSE文件。