PrayerTimes
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.
Install / Use
/learn @alhazmy13/PrayerTimesREADME
<p align="center">
<img src="https://cloud.githubusercontent.com/assets/4659608/12700363/37218668-c7f0-11e5-9edf-944176e4019f.png">
</p>
</br>
Create an
Prayer Times
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. :)
Installation
Maven
<dependency>
<groupId>net.alhazmy13.PrayerTimes</groupId>
<artifactId>library</artifactId>
<version>1.0.1-beta</version>
</dependency>
Gradle
dependencies {
compile 'net.alhazmy13.PrayerTimes:library:1.0.1-beta'
}
Usage
Create an PrayerTime
You will need to create a new instance of PrayerTime. Once the instance are configured, you can call getPrayerTimes().
PrayerTime prayers = new PrayerTime();
prayers.setTimeFormat(PrayerTime.TimeFormat.Time12);
prayers.setCalcMethod(PrayerTime.Calculation.Makkah);
prayers.setAsrJuristic(PrayerTime.Juristic.Shafii);
prayers.setAdjustHighLats(PrayerTime.Adjusting.AngleBased);
prayers.setOffsets(new int[]{0, 0, 0, 0, 0, 0, 0});
ArrayList<String> prayerTimes = prayers.getPrayerTimes(Calendar.getInstance(),
latitude, longitude, timezone);
Configurations
setTimeFormatTo change the time format to:Time2424-hour formatTime1212-hour formatTime12NS12-hour format with no suffixFloatingfloating point number
prayers.setTimeFormat(PrayerTime.TimeFormat.Time12);
setCalcMethodTo change the Calculation Methods.KarachiUniversity of Islamic Sciences, KarachiISNAIslamic Society of North America (ISNA)MWLMuslim World League (MWL)MakkahUmm al-Qura, MakkahEgyptEgyptian General Authority of SurveyJafariIthna AshariTehranInstitute of Geophysics, University of TehranCustomCustom Setting
prayers.setCalcMethod(PrayerTime.Calculation.Makkah);
setAsrJuristicTo change Juristic Method for AsrShafiiShafii (standard)HanafiHanafi
prayers.setAsrJuristic(PrayerTime.Juristic.Shafii);
setAdjustHighLatsAdjusting Methods for Higher LatitudesNoneNo adjustmentMidNightmiddle of nightOneSeventh1/7th of nightAngleBasedangle/60th of night
prayers.setAdjustHighLats(PrayerTime.Adjusting.AngleBased);
setOffsetsTune timings for adjustments
prayers.setOffsets(new int[]{0, 0, 0, 0, 0, 0, 0});
License
Copyright 2016 alhazmy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
