Join the discussion
Write your take first — we'll ask for email only when you're ready to publish.
- Hacker News
- Makes me want to build this physically with a color e-ink display + a standardish 24h clock mechanismby miniBill
- go for it - make it a GitHub with a link to the shopping cart etc.by guest__user
- This is great. Reminds me of the Solar Dial watch face on my Apple Watch.by tizio13
- Nice. I've been making a version of this that I submitted to ycombinator, testing the thesis "If we schedule our life around the sun including afternoon naps" we perform better.
Check it out and give me feedback. It has a long ways to go.
by mannanj - This is the author's account: https://news.ycombinator.com/user?id=perilunarby Gecko4072
- hi :)by perilunar
- Sorry, not giving my position. Would be nice if i could set an address, or coordinates (for example i may not care for my particular location)by monegator
- And it's handy for people who wanna know what the sun is going to do elsewhere too!by cerebrum01
- It would be even cooler to be able to set a point on a map and watch the clock change as the point is dragged around...
- I've been wanting to build this exact clock for awhile now. My feature request would be to include a timeline at the bottom of the page that I can scroll back and forth through days of the year to see everything shift.
- Author here — I'm thinking of adding something like that to the calendar page, or adding a separate 'carpet plot' of times over the year.by perilunar
- It must be clock-making time... I built a 24-hour clock a few days ago but in base-12 and with 72 seconds per minute (to reuse the outer 24-hour dial, with 3 subdivisions to make it closer to the normal second)
https://jasonincanada.github.io/24-hour-base-12-clock.html#w...
- interestingby babu_mick
- Also made something like this called Sun Path which tracks where the sun is through centuries and how the path deviates ever so slowly.
Plus there are all the equinoxes and solstices.
by momentmaker - Dragging the globe around isn't working on touch; it feels like it's missing touch-action: noneby sheept
- Neat. One of my favourite sites, which also shows daylight, is WeatherSpark[0], obviously focused on weather and it allows you to compare locations based on yearly rainfall, cloud cover, muggy conditions, all sorts of stuff. Always check it when going on vacation or relocating.by fer
- Thanks for posting this, I remember seeing it somewhere some time ago but didn't bookamrk the site and couldn't remember the name. It has some very nice plots (and city comparison) for data freaks like myself :-)by NKosmatos
- I love it. It'd be nice if I could click points on a map and see the difference to my local one as well. Or in the calendar view if it'd show a copy of the clock (i.e. coloring not current hand positions) for the time I'm hovered over.by zamadatix
- That’s actually pretty close to what I ended up building.
For the first one, I skipped the map and went with search + saved cities instead. All your saved places sit on the same 24-hour dial, so you can see the difference from your local time at a glance without doing the timezone math. The upside is that it works completely offline and fits nicely on Apple Watch too.
Your second suggestion is the part I only got halfway right. You can move the dial in 15-minute increments and the daylight/twilight colouring changes with it. There’s also a calendar where you can jump to any date and time and see what the solar state is in every saved city, but right now that’s shown in rows rather than by recolouring the clock itself.
I like your version better though, hovering/scrubbing a time and having the whole clock recolour for that moment would make a lot more sense. I’m going to add that to the list.
I’m the developer, btw: https://apps.apple.com/app/id6797192832
by duman - It looks like the "golden hour" may be hardcoded as the hour before sunset. May I suggest updating it to be based on the sun's position in the sky?
In high-northern and low-southern latitudes, the sun can stay close to the horizon for long stretches of the day depending on the season. For example, in Iceland in parts of the spring and fall, the golden hour lasts for most of the day - amazing for photography and just enjoying the scenery.
by TimTheTinker - In northern Alaska it can last most of the day in the winter, and most of the night in the summer.
- Author of suncalc (the JS library behind the sun calculations) here — happy to see such a nice application of it! Heads up if the author's reading this — I recently released a major overhaul of the library that makes it a lot more precise: https://github.com/mourner/suncalcby mourner
- what sorts of background texts/sources of info did you use?
edit: i think i have the dover book your readme mentions :)
- I am working on a clock app that keeps time the Roman Empire way (every day has twelve hours that start at sunrise and end at sunset, so the duration of each hour changes slightly each day), so this library would be extremely helpful. Thank you!by prometheus76
- Author of Sun Clock here — thanks for the library! I'll check out the new release soon and update.by perilunar
- I just used Suncalc yesterday to add Sunrise/Sunset and Golden Hour to my PebbleOS NOAA Radar watchface[1]. Thank you for an amazing library; It's the first that I reach for every time I have a project with this need.by xd1936