buildscientist / prayertime Goto Github PK
View Code? Open in Web Editor NEWA Go library for Muslim prayer times
License: Apache License 2.0
A Go library for Muslim prayer times
License: Apache License 2.0
Prayer time calculations for cities that have high latitudes (e.g. Helsinki, Finland) are invalid when using a high latitude calculation option of one seventh.
Example:
var helsinki = praytime.New(60.192059, 24.945831, 3)
helsinki.AdjustHighLats = praytime.ONE_SEVENTH
var helsinkiPrayerTime = praytime.CalculatePrayerTimes(&helsinki, time.Now())
Output:
=======Helsinki=======
September 21 2017
fajr - 04:31
sunrise - 07:00
dhuhr - 13:13
asr - 16:29
sunset - 19:30
maghrib - 19:30
isha - 21:50
According to alternative Prayer time calculators both Fajr and Isha should be offset by 52 and 47 minutes respectively.
Module vendoring will be introduced with GoLang v1.12. While prayertime was written with GoLang v1.7.x the library should be vendored accordingly such that users will be able to use it with vgo/go mod.
The prayertime module contains a PrayerLocale struct and a set of functions that you pass a reference to a PrayerLocale struct to.
Interfaces should be used instead as this makes the code cleaner and composable. This would purely be considered a refactor as the underlying functionality of the API should not change.
When using praytime.MAKKAH as a prayer calculation method - Isha prayer times are undefined.
var toronto = praytime.New(43.6532, -79.3832, -4.0)
toronto.PrayerCalcMethod = praytime.MAKKAH
var torontoPrayerTime = praytime.CalculatePrayerTimes(&toronto, time.Now())
Output is:
=======Toronto=======
September 21 2017
fajr - 05:23
sunrise - 07:03
dhuhr - 13:10
asr - 17:30
sunset - 19:20
maghrib - 19:20
isha - -----
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.