[FREE] [OFFLINE] [GITHUB] Prayer Times for Muslim

Muslim Prayer Times

Free & Offline

Prayer Times Calculator (Fajr, Dhuhr, Asr, Maghrib, Isha, Dhuha, Culmination, Sunrise/Sunset) and Qibla Direction. Supports presets, custom angles, one-time initialization, and individual calculations.

Download Here Free:
AIX

GITHUB

All Block

Instruction

Init Param

Example Calculating Fajr

If you want calculate all time in single block.
Output as a LIST:
Fajr, Sunrise, Duha, Dhuhr, Asr, Maghrib, Sunset, Isha, Midday, Qibla

Methods:

CalculateAllTimes

Calculates all prayer times, Dhuha time, Culmination, Sunrise/Sunset, and Qibla direction. Returns an ordered list: Fajr, Sunrise, Duha, Dhuhr, Asr, Maghrib, Sunset, Isha, Midday, Qibla. This function also sets the location and date for individual calculations.

Parameter Type
latitude number
longitude number
timezone number
day number
month number
year number

Return Type: list

CalculateAsrTime

CalculateAsrTimeBlock
Calculate Asr (Asr) time based on last settings.
Return Type: text

CalculateDhuhaTime

CalculateDhuhaTimeBlock
Calculate Dhuha time based on last settingsr.
Return Type: text

CalculateDhuhrTime

CalculateDhuhrTimeBlock
Calculates the time of Zuhr (Dhuhr) based on the last setting. Same as Midday.
Return Type: text

CalculateFajrTime

CalculateFajrTimeBlock
Calculate the Fajr (Subuh) time based on the last settings.
Return Type: text

CalculateIshaTime

CalculateIshaTimeBlock
Calculate Isha (Isha) time based on the last setting.
Return Type: text

CalculateMaghribTime

CalculateMaghribTimeBlock
Calculates Maghrib time based on the last setting. Same as Sunset.
Return Type: text

CalculateMiddayTime

CalculateMiddayTimeBlock
Calculates Midday (Sun Culmination) time based on the last setting.
Return Type: text

CalculateSunriseTime

CalculateSunriseTimeBlock
Calculates Sunrise time based on the last setting.
Return Type: text

CalculateSunsetTime

CalculateSunsetTimeBlock
Calculates Sunset time based on the last setting.
Return Type: text

GetActiveAngles

A code snippet calling the GetActiveAnt() function from the PTC object and storing the result in the ant variable. (Captioned by AI)
Returns a list of: [Fajr Angle, Isha Angle, Asr Factor] currently in use.
Return Type: list


Old Method replace with dropdown

MethodCUSTOM

MethodCUSTOMBlock
String constant for Custom method (CUSTOM).
Return Type: text

MethodEGYPT

MethodEGYPTBlock
String constant for EGYPT method.
Return Type: text

MethodISNA

MethodISNABlock
String constants for the ISNA method.
Return Type: text

MethodKARACHI

MethodKARACHIBlock
String constants for KARACHI methods.
Return Type: text

MethodMWL

MethodMWLBlock
String constants for the Muslim World League (MWL) method.
Return Type: text


SetCalculationMethod

SetCalculationMethodBlock
Sets the prayer time calculation method. Use the Method… Function Block as input. The default is MWL.

Parameter Type
method text

SetCustomAngles


Set custom angles for Fajr and Isha, as well as Asr Factor (1=Shafii, 2=Hanafi). Automatically switches to CUSTOM method.

Parameter Type
fajrAngle number
ishaAngle number
asrFactor number

SetLocationDateAndInit


Initialize location, date and time zone for all subsequent prayer calculations.

Parameter Type
latitude number
longitude number
timezone number
day number
month number
year number

calculateQibla

calculateQiblaBlock
Calculates the Qibla direction (in degrees from North) from the given latitude and longitude.

Parameter Type
lat number
lon number

Return Type: number

CalculateMonthlyTimes

CalculateMonthlyTimesBlock
Calculates prayer times for all days of the month. Returns a list of lists with headers.

Parameter Type
targetMonth number
targetYear number

Return Type: list

CalculateYearlyTimes

CalculateYearlyTimesBlock
Calculates prayer times for all days of the year. Returns a list of lists with headers.

Parameter Type
targetYear number

Return Type: list


Update lastest version method with helper/dropdown

Helper:

MWL

MWLBlock
Option for MWL
Returns: MWL
Deprecated: false

ISNA

ISNABlock
Option for ISNA
Returns: ISNA
Deprecated: false

EGYPT

EGYPTBlock
Option for EGYPT
Returns: EGYPT
Deprecated: false

KARACHI

KARACHIBlock
Option for KARACHI
Returns: KARACHI
Deprecated: false

CUSTOM

CUSTOMBlock
Option for CUSTOM
Returns: CUSTOM
Deprecated: false

So the method look like this:
image

Sorry if there are any mistakes. I just only use Google Translate.

3 Likes

Thank you for your contribution

Please replace these procedures by helper blocks

Adding Helper Blocks to a Component and How to add a Dropdown Block to a Component

See also an example here

Taifun

1 Like

DONE! Thank you

Post updated!

1 Like

Great!
Please also correct the screenshots

Taifun

Okey DONE!
Thx!

1 Like

Thank you for your contribution.
Please try adding an AIA file. This will make it easier for others in the community to try out your plugin. Good luck! :100: