islamic-network / aladhan.com Goto Github PK
View Code? Open in Web Editor NEWThe AlAdhan.com website and app
Home Page: https://aladhan.com
License: GNU General Public License v3.0
The AlAdhan.com website and app
Home Page: https://aladhan.com
License: GNU General Public License v3.0
Hello ๐๐พ First off I would like thank you all for your efforts in this project. I have a few questions regrading the behavior of the https://aladhan.com/prayer-times-api#GetTimingsByCity API. I'm not sure this is the proper repo to ask tis question so feel free to transfer this issue to the proper location.
What are the supported countries for this API?
For the state field is this analogous to providence for countries like Canada? e.g. If I wanted prayer times for toronto would I provide?city=Toronto&state=Ontario&country= CA
?
If you run a dummy request with invalid country it could guess the closest city with that name? For example using the city Rochester with the country foo returns the following: As you can see below, the data returned is for Rochester, NY, US. Seems like the API uses google geocoding to guess your location? How does it choose Rochester, NY when there are multiple cities named Rochester in the US? Is there a way to disable using geocoding and simply return an error if the city + state + country is invalid?
You can test this by going here: https://api.aladhan.com/v1/timingsByCity?city=Rochester&state=&country=foo
{
"code":200,
"status":"OK",
"data":{
"timings":{
"Fajr":"05:43",
"Sunrise":"07:02",
"Dhuhr":"12:24",
"Asr":"15:19",
"Sunset":"17:47",
"Maghrib":"17:47",
"Isha":"19:06",
"Imsak":"05:33",
"Midnight":"00:24"
},
"date":{
"readable":"19 Feb 2021",
"timestamp":"1613790206",
"hijri":{
"date":"07-07-1442",
"format":"DD-MM-YYYY",
"day":"07",
"weekday":{
"en":"Al Juma'a",
"ar":"\u0627\u0644\u062c\u0645\u0639\u0629"
},
"month":{
"number":7,
"en":"Rajab",
"ar":"\u0631\u064e\u062c\u064e\u0628"
},
"year":"1442",
"designation":{
"abbreviated":"AH",
"expanded":"Anno Hegirae"
},
"holidays":[
]
},
"gregorian":{
"date":"19-02-2021",
"format":"DD-MM-YYYY",
"day":"19",
"weekday":{
"en":"Friday"
},
"month":{
"number":2,
"en":"February"
},
"year":"2021",
"designation":{
"abbreviated":"AD",
"expanded":"Anno Domini"
}
}
},
"meta":{
"latitude":43.1448135,
"longitude":-77.5903625,
"timezone":"America\/New_York",
"method":{
"id":2,
"name":"Islamic Society of North America (ISNA)",
"params":{
"Fajr":15,
"Isha":15
}
},
"latitudeAdjustmentMethod":"ANGLE_BASED",
"midnightMode":"STANDARD",
"school":"STANDARD",
"offset":{
"Imsak":0,
"Fajr":0,
"Sunrise":0,
"Dhuhr":0,
"Asr":0,
"Maghrib":0,
"Sunset":0,
"Isha":0,
"Midnight":0
}
As an organised person and a praying person, I want my day to be well- planned. I use calendar apps intensively to plan the day, and all my personal and work entries are there. I want to make sure I make enough time for my daily prayers, so Iโd like to have them added to my calendar as standard calendar entries. That would also mark me busy for my family and coworkers who check my availability before scheduleing meetings and calls. So I want to have an option to download prayers timetable as a CSV to import it later to my calendar. CSVs should be available with data for a year (for prayers in permanent stay area), a month, a week, and a single day (for long and short trips).
For example, part of the CSV for 1 September 2021 could look like this:
Subject | Start Date | Start Time |
---|---|---|
Fajr | 01-09-2021 | 03:29 |
Sunrise | 01-09-2021 | 05:34 |
Dhuhr | 01-09-2021 | 12:30 |
Asr | 01-09-2021 | 16:14 |
Maghrib | 01-09-2021 | 19:24 |
Isha | 01-09-2021 | 21:18 |
I tried many version but always get bad request. can you please provide an example url for this purpose. Best regards
Assallam,
It seems a few people have this issue, I figured I would report here too. I cannot access aladhan.com from multiple AU IP's but I can access it from a Ukraine IP range fine. Is there some sort of geo blocking occurring now?
This has also affected a few Home Assistant users for the Islamic Prayer times integration which uses the aladhan.com API.
There is currently a dependency on the HijriCalendarService class in the API. Update the API client and use that instead!
ุงูุณูุงู ุนูููู โโ.
Would you, please, help me?
My site is: http://salyat.com/converter/
here's a code: https://gist.github.com/iamjenechka/73dcc438482d5ab6996cf136cc6f4829
and I got:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.aladhan.com/gToH?date=04-02-2024
I believe the documentation for the tune
parameter is incorrect.
The documentation mentions that the order is: Imsak,Fajr,Sunrise,Zhuhr,Asr,Sunset,Maghrib,Isha,Midnight
However, I think Sunset,Maghrib
are flipped.
The example URL has Sunset = 3 and Maghrib = 4: https://api.aladhan.com/timingsByAddress/09-03-2015?address=Dubai,UAE&method=8&tune=2,3,4,5,2,3,4,5,-3
However, the response clearly uses Sunset = 4 and Maghrib = 3:
"offset":{"Imsak":"2","Fajr":"3","Sunrise":"4","Dhuhr":"5","Asr":"2","Maghrib":"3","Sunset":"4","Isha":"5","Midnight":"-3"}
Should the documentation describing the order be updated?
I am planning to change the following set in the wesite:
As /play and /calendar are now rendering on the server side, we're logging some bad location errors for locations we can't geolocate.
We need a pretty and graceful way to handle these 400 errors from the API.
A try and catch will do, but the app routes file needs cleaning up and this is an opportunity to get a handle on some of that code.
Add URLs to the relevant repos and docker container
I have a Chrome Extension called Quran In a New Tab and I've been using this API for a while. However, recently all requests are blocked with the following error:
Access to XMLHttpRequest at 'http://api.aladhan.com/v1/hToG?date=27-5-1443' from origin 'chrome-extension://fdhiopcnpihkmbkfagjdibggbaangnjp' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
If it's possible to fix this issue it would be of great help. Thank you.
This will allow us to publish the docs using ApiDocJS rather than manually adding documentation
Entering a bad location results in endless retires to geocode. It seems that successful geocode calls update timings but error responses do not:
aladhan.com/html/js/jquery.alAdhan.js
Lines 119 to 126 in f465f37
One solution would be to clear out _location
on error and display an error message above location field. Could be annoying for slow typers, though, since we auto-fetch every seven seconds...
Post daylight savings, (using the Umm ul-Qurra method) the Isha calculation after maghrib is off by 30 minutes. it used to correctly show Isha being 90 minutes after maghrib, but now it's 120 minutes after maghrib
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.