Documentation menu
Best practices
How to choose a timetable, keep data fresh and handle errors, so the times people see match the calendar their masjid follows.
Choose the right timetable
Some places have more than one calendar. Suggest the nearest from coordinates, and let people pick the one their masjid follows.
Cache a year, refresh on change
Store the year file and look up each date locally. Fetch it again when dataVersion in index.json changes.
Keep Kerala time
Times are local to Kerala (UTC+05:30). Do not convert them to the device’s time zone. For jama‘ah times, people should check with their masjid.
Show the source calendar
Display location.source beside the times. People look for the calendar they follow, and it credits those who prepared it.
Errors
Check the HTTP status and the Content-Type header before parsing, and keep a helpful message on screen when a file is unavailable.
| Status | Meaning | What to do |
|---|---|---|
| 200 OK | The file exists. | Read the JSON. |
| 404 Not Found | The id or year does not exist. | Check the id in locations.json and the years in index.json. |