Global Configuration - Startappz/prayer_times GitHub Wiki
Global configuration have several attributes. You can change them as follows:
Times names
# Default value
times_names = {
imsak: 'Imsak',
fajr: 'Fajr',
sunrise: 'Sunrise',
dhuhr: 'Dhuhr',
asr: 'Asr',
sunset: 'Sunset',
maghrib: 'Maghrib',
isha: 'Isha',
midnight: 'Midnight'
}
You can change it:
PrayerTimes.times_names = {# options....
}
Iterations Count
This is a pure algorithmic factor. Don't change it unless you know what you are doing.
# Default value
iterations_count = 1
You can change it:
PrayerTimes.iterations_count = 3
Calculation Methods
Those can be changed as described here.
Calculation Method
Based on the above methods you can set the calculation method:
# Default value
calculation_method = calculation_methods['MWL']
You can change it:
PrayerTimes.calculation_method = calculation_methods['Some other method']
Time Formatting
# The option time_format takes the following values:
# '24h': 24-hour format,
# '12h': 12-hour format,
# '12hNS': 12-hour format with no suffix,
# 'Float': floating point number,
time_format = '24h'
You can change it:
PrayerTimes.time_format = '12h'
Time Suffixes
time_suffixes= {:am => 'AM', :pm => 'PM'}
You can change it:
PrayerTimes.time_suffixes= {:am => 'صباحا', :pm => 'مساءا'}
Time Offsets
If you want to add some manual times adjustments, then here you can do it:
times_offsets = {
imsak: 0,
fajr: 0,
sunrise: 0,
dhuhr: 0,
asr: 0,
sunset: 0,
maghrib: 0,
isha: 0,
midnight: 0
}
You can change it:
PrayerTimes.times_offsets= { #options here ...
}
Invalid Time
invalid_time = '-----'
You can change it:
PrayerTimes.invalid_time = "INVALID"