Code Monkey home page Code Monkey logo

prayertimes-1's Introduction

# Prayer Times ![](https://img.shields.io/badge/Platform-Android-brightgreen.svg) ![](https://img.shields.io/crates/l/rustc-serialize.svg) ![](https://img.shields.io/badge/version-1.0.1_beta-blue.svg)

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

  • setTimeFormat To change the time format to:
    • Time24 24-hour format
    • Time12 12-hour format
    • Time12NS 12-hour format with no suffix
    • Floating floating point number
prayers.setTimeFormat(PrayerTime.TimeFormat.Time12);
  • setCalcMethod To change the Calculation Methods.
    • Karachi University of Islamic Sciences, Karachi
    • ISNA Islamic Society of North America (ISNA)
    • MWL Muslim World League (MWL)
    • Makkah Umm al-Qura, Makkah
    • Egypt Egyptian General Authority of Survey
    • Jafari Ithna Ashari
    • Tehran Institute of Geophysics, University of Tehran
    • Custom Custom Setting
 prayers.setCalcMethod(PrayerTime.Calculation.Makkah);
  • setAsrJuristic To change Juristic Method for Asr
    • Shafii Shafii (standard)
    • Hanafi Hanafi
prayers.setAsrJuristic(PrayerTime.Juristic.Shafii);
  • setAdjustHighLats Adjusting Methods for Higher Latitudes
    • None No adjustment
    • MidNight middle of night
    • OneSeventh 1/7th of night
    • AngleBased angle/60th of night
prayers.setAdjustHighLats(PrayerTime.Adjusting.AngleBased);
  • setOffsets Tune 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.

prayertimes-1's People

Contributors

alhazmy13 avatar

Stargazers

MohsinAli avatar

Watchers

MohsinAli avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.