Sun & Moon
Dayze is about every day — and every day is shaped by the sun and the moon. This signature feature weaves the rhythm of the sky into your home page, Day Cards, and Dayze Agent.
Sun Arc Widget
A compact semicircular SVG arc sits below your profile card, showing the sun's journey from sunrise to sunset:
- •A golden sun orb moves along the arc in real time
- •Sunrise and sunset times are labeled at each end
- •At night, a moon crescent replaces the sun
- •A label below shows "Xh Ym of daylight left" or "Sunrise in Xh Ym"
Daylight Progress Bar
A thin, elegant bar below the arc visualizes the day's daylight:
- •Golden gradient fill representing elapsed daylight
- •A small marker dot at the current time position
- •Golden hour zones highlighted near sunrise and sunset ends
- •Night portions shown in deep navy
- •Text label: "8h 23m of daylight remaining" or "Sunrise in 3h 12m"
Moon Phase on Day Cards
Every Day Card now shows the moon phase for that date, right next to the day and date:
Hover or tap the moon emoji to see the phase name and illumination percentage.
The moon phase is calculated from the synodic month (29.53 days) — it works for any date, including historical Day Cards. All eight phases are supported: New Moon, Waxing Crescent, First Quarter, Waxing Gibbous, Full Moon, Waning Gibbous, Last Quarter, and Waning Crescent.
Dayze Agent & the sky
Dayze Agent receives sun and moon context in its system prompt:
Sunrise: 6:42 AM, Sunset: 6:58 PM
Moon phase: Waning Crescent 🌘 (18% illuminated)
Daylight remaining: 4h 23m
This means Dayze Agent can naturally reference the sky in conversation — “It's golden hour, perfect time for photos!” or “Full moon tonight, maybe a good evening for a walk.”
How It Works
Data Source
Sunrise and sunset times come from the Open-Meteo API, using your browser's geolocation. If location access is denied or unavailable, Dayze falls back to an astronomical estimate using your timezone name, solar declination, and equation-of-time correction — accurate to within ~5–10 minutes for 35+ major cities worldwide. The sun arc and daylight bar always appear.
Moon Phase Calculation
The moon phase is computed from the synodic month cycle (29.53 days) relative to a known new moon reference date. No API call required — it's a pure date calculation that works for any date, past or future.
Performance
All calculations are pure functions in a single utility module (lib/sun-moon.ts). No JavaScript animation loops — updates happen through React's 1-second interval tick. The Open-Meteo fetch happens once on page load with a 10-minute cache.