A simple web-based Iftar Time Calculator that calculates the iftar (sunset) time based on mathematical sunset calculations using JavaScript. It utilizes geolocation to fetch the user's latitude and longitude, then calculates the sunset time accordingly.
view this Page https://riaz9543.github.io/Ifter_time/
✅ Automatic Location Detection – Uses your device's GPS to fetch coordinates. ✅ Sunset Calculation – Computes sunset time based on astronomical formulas. ✅ Local Time Adjustment – Converts UTC sunset time to Bangladesh Standard Time (BST). ✅ Warning for Atmospheric Refraction – Highlights the 1-2 minute discrepancy due to atmospheric bending. ✅ Mobile Friendly UI – Works seamlessly on mobile & desktop. ✅ Manual Time Calculation – Includes a manual mode for entering coordinates.
-
The user grants location permission for accurate calculations.
-
The script fetches latitude & longitude using the browser's Geolocation API.
-
It calculates sunset time in UTC using an astronomical formula.
-
Converts the UTC time to Bangladesh Standard Time (BST, UTC+6).
-
Displays the sunset time, location, and date.