Muslim prayer times

Would this be a fairly simple thing to do for a widget? I looked on GitHub and couldn’t find anything to reference.

Just a thought.

I think you are looking for something like this :slight_smile:
Here is the script (Timing is for Singapore, you can change for your location):

1 Like

Getting an error message on line 18:26 Type Error Null is not an object

(evaluating ‘json[cur.getMonth()]’)

Not sure what that means but I do appreciate you posting this.

I think you didn’t download the cache file 2020.json and save it into scriptable/data folder for the prayer times. But it’s fine, I have updated the script to fetch the prayer times from GitHub url directly. You may get the latest script from the same url above.

Yeah still get the same message with new updated code you provided. I even tried downloading the file needed to the proper scriptable directory with the original code and get the same message.

I’ll look around to see if there’s another widget on GitHub that I can get working.

Got it to work finally. I appreciate your help. I wonder if there’s a script that draws from a official website like prayer times to get your location and give you the data that way. I’ve been looking but I haven’t found much.

how did you get it to work?! if you mean the provided JSON file yes it works but i can’t get to work in my location. i could’t parse the data for my location sadly