Behind the Sun Tool
The thinking and the maths behind how the tool is built.
How We Compute Sunrise & Sunset in Your Browser
No weather API for the sun — just solar-position maths running client-side, accurate to about a minute.
Read EngineeringThe Math Behind Our Solstice & Equinox Dates
How the tool pins the four turning points of the year to the minute using Meeus's formulas.
ReadThere's no weather API involved in the Sun Times tool — sunrise, sunset, solar noon and the solstice and equinox dates are all computed client-side from solar-position formulas the moment you load the page, accurate to about a minute for any location on Earth. That means the tool works instantly with no network round trip for the calculation itself, and your location is only ever used locally to plug into the maths.
These posts explain the astronomy behind that: how the tool tracks the sun's position using well-established equations rather than a lookup table, and how it pins the four turning points of the year — the two solstices and two equinoxes — to the minute using Jean Meeus's widely used solar-position formulas. The same approach keeps the tool working offline once loaded, since every calculation happens locally instead of depending on a server round trip. If you'd rather read about using the tool than building it, see the Articles section for golden-hour photography tips. The same offline-first approach carries over to the Moon Phase tool, which computes phase and illumination with orbital maths instead of an astronomy API.