SunWhen answers one question: "When will I see the sun?" We combine weather forecasts with sunrise/sunset data to predict clear sky periods at your exact location.
Just open the app, allow location access, and instantly see when the next sunny period will be.
Location Detection
When you open SunWhen, we request your location using your browser's geolocation API. This gives us your precise coordinates (latitude and longitude) needed for accurate forecasts.
Weather Data Retrieval
Using your coordinates, we fetch hourly weather forecasts from Open-Meteo, a reliable open-source weather API. We retrieve 7 days of hourly data including cloud cover percentages and daylight information.
Sun Visibility Analysis
Our algorithm analyzes each hour to determine if the sun will be visible. We consider two factors: Is it daytime? Is cloud cover below your threshold? Hours that meet both criteria are marked as "clear."
Clear Period Detection
We group consecutive clear hours into "clear periods" and calculate their duration. This tells you not just when the sun will appear, but how long you can expect it to last.
Results Display
Finally, we present the information in an easy-to-read format: the next clear period, upcoming sunny times, current conditions, and a 48-hour visual forecast.
Cloud cover is measured as a percentage from 0% (completely clear) to 100% (completely overcast). Here's what different levels typically mean:
You can adjust your personal threshold in the settings. A lower threshold means you want clearer skies; a higher threshold means you're okay with some clouds.
The visual chart shows cloud cover for the next 48 hours:
The height of each bar represents the cloud cover percentage. The dashed line shows your current threshold setting.
We use the Open-Meteo API, which aggregates data from national weather services worldwide. It provides:
Sunrise and sunset times are calculated based on your coordinates and the current date. This ensures we only show sun visibility during actual daylight hours.
Weather forecasting is inherently uncertain. Here's what to expect:
We recommend checking back regularly for updated predictions, especially for activities planned more than a day ahead.