Inherits from NSObject
Declared in PrayTime.h

Overview

The class for calculating Muslim Prayer Times.

Depending on how you configure your project you may need to import “PrayTime.h”.

Here is an example for getting prayer times for a given longitude and latitude:

PrayTime *prayerTime = [[PrayTime alloc] initWithJuristic:JuristicMethodShafii
                                           andCalculation:CalculationMethodMWL];
NSMutableArray *prayerTimes = [prayerTime prayerTimesDate:[NSDate date]
                                                 latitude:3.1667
                                                longitude:101.7000
                                              andTimezone:[prayerTime getTimeZone]];

Instance Methods

getDatePrayerTimesForYear:month:day:latitude:longitude:andtimeZone:

Returns prayer times for the provided values.

- (NSMutableArray *)getDatePrayerTimesForYear:(NSInteger)year month:(NSInteger)month day:(NSInteger)day latitude:(double)latitude longitude:(double)longitude andtimeZone:(double)tZone

Parameters

year

Year.

month

Month.

day

Day.

latitude

The north-south position of a point on the Earth’s surface.

longitude

Angle which ranges from 0° at the Equator to 90° (North or South) at the poles.

tZone

Hours difference in GMT.

Return Value

Returns a NSMutableArray object of prayer times.

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h

getPrayerTimesForDate:withLatitude:longitude:andTimeZone:

Returns prayer times for the provided values.

- (NSMutableArray *)getPrayerTimesForDate:(NSDateComponents *)date withLatitude:(double)latitude longitude:(double)longitude andTimeZone:(double)tZone

Parameters

date

Components of a date.

latitude

The north-south position of a point on the Earth’s surface.

longitude

Angle which ranges from 0° at the Equator to 90° (North or South) at the poles.

tZone

Hours difference in GMT.

Return Value

Returns a NSMutableArray object of prayer times.

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h

getTimeZone

Returns hours difference in GMT.

- (double)getTimeZone

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h

initWithJuristic:andCalculation:

Initializes prayer times instance with the provided values.

- (id)initWithJuristic:(JuristicMethod)juristic andCalculation:(CalculationMethod)calculation

Parameters

juristic

Juristic method for prayer times in JuristicMethod.

calculation

Prayer calculation method in CalculationMethod.

Return Value

Returns the instance of PrayTime.

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h

prayerTimesDate:latitude:longitude:andTimezone:

Returns prayer times for the provided values.

- (NSMutableArray *)prayerTimesDate:(NSDate *)date latitude:(double)latitude longitude:(double)longitude andTimezone:(double)timezone

Parameters

date

Date object.

latitude

The north-south position of a point on the Earth’s surface.

longitude

Angle which ranges from 0° at the Equator to 90° (North or South) at the poles.

tZone

Hours difference in GMT.

Return Value

Returns a NSMutableArray object of prayer times.

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h

prayerTimesFromLocation:

Returns prayer times for the provided location.

- (NSMutableArray *)prayerTimesFromLocation:(CLLocation *)location

Parameters

location

Location object.

Return Value

Returns a NSMutableArray object of prayer times.

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h

prayerTimesFromLocation:forDate:

Returns prayer times for the provided location and date.

- (NSMutableArray *)prayerTimesFromLocation:(CLLocation *)location forDate:(NSDate *)date

Parameters

location

CLLocation object.

date

NSDate object.

Return Value

Returns a NSMutableArray object of prayer times.

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h

prayerTimesFromLocation:forDate:timezone:

Returns prayer times for the provided location, date and timezone.

- (NSMutableArray *)prayerTimesFromLocation:(CLLocation *)location forDate:(NSDate *)date timezone:(NSTimeZone *)timezone

Parameters

location

Location object.

date

Date object.

timezone

Timezone object.

Return Value

Returns a NSMutableArray object of prayer times.

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h

setCalculationMethod:

Sets prayer calculation method.

- (void)setCalculationMethod:(CalculationMethod)method

Parameters

method

Prayer calculation method in CalculationMethod.

Return Value

Returns a NSMutableArray object of prayer times.

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h

setCustomParams:

Sets custom values for calculation parameters.

- (void)setCustomParams:(NSMutableArray *)params

Parameters

params

Parameters in NSMutableArray.

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h

setDhuhrMinutes:

Sets the minutes after mid-day for calculating Dhuhr.

- (void)setDhuhrMinutes:(double)minutes

Parameters

minutes

Minutes after dhuhr.

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h

setFajrAngle:

Sets the angle for calculating Fajr.

- (void)setFajrAngle:(double)angle

Parameters

angle

Angle.

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h

setHighLatitudsMethod:

Sets adjusting method for higher latitudes.

- (void)setHighLatitudsMethod:(AdjustMethodHigherLatitude)method

Parameters

method

Adjusting method for higher latitude in AdjustMethodHigherLatitude.

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h

setIshaAngle:

Sets the angle for calculating Isha.

- (void)setIshaAngle:(double)angle

Parameters

angle

Angle.

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h

setIshaMinutes:

Sets the minutes after Maghrib for calculating Isha.

- (void)setIshaMinutes:(double)minutes

Parameters

minutes

Minutes after isha.

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h

setJuristicMethod:

Sets the juristic method for Asr.

- (void)setJuristicMethod:(JuristicMethod)method

Parameters

method

Prayer calculation method in JuristicMethod.

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h

setMaghribAngle:

Sets the angle for calculating Maghrib.

- (void)setMaghribAngle:(double)angle

Parameters

angle

Angle.

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h

setMaghribMinutes:

Sets the minutes after Sunset for calculating Maghrib.

- (void)setMaghribMinutes:(double)minutes

Parameters

minutes

Minutes after maghrib.

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h

setTimeFormat:

Sets time format.

- (void)setTimeFormat:(TimeFormat)format

Parameters

format

Time format in TimeFormat.

Availability

Available in 0.1.0 and later.

Declared In

PrayTime.h