Live data from Hacker News

Sun Clock

sunclock.net

61–70 of 96 posts

Re: Sun Clock

#61

Clocks like this are fun. I coded one but couldn’t decide how to handle the corner cases where the sun rises but does not set (and vice versa). You also have to decide if you’re showing the time that the sun rose today or if it should be tomorrow once you’ve already passed that time. Either way, at a certain point you’ll see the UI shift. At moderate latitudes it makes little difference but the effect can be quite ex…

> how to handle the corner cases where the sun rises but does not set (and vice versa)

In practice it doesn't matter: you get a thin sliver of twilight between solar midnight and sunrise or sunset, and a 'Sunset: Does not occur' message in the text info. In such cases the sunrise/sunset arc (sector?) is pretty broad anyway.

> or if it should be tomorrow once you’ve already passed that time

Yes. I chose to recalculate the times midnight.

> Either way, at a certain point you’ll see the UI shift

Yes, but it's usually not dramatic. A few minutes time and fractions of a degree each day. The biggest shift occurs when Daylight Saving time changes — you get a big 15° rotation in the display. Most people are asleep when that happens, but it's cool to watch it jump.

Re: Sun Clock

#62

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.

Re: Sun Clock

#63
post #31

Love it! One weird thing: the author of this clock/calendar portrays the year rotating clockwise (click on the calendar icon in top left to see the "annual" calendar): January in 12 to 1 o'clock, February in 1 to 2 o'clock, etc. and December in 11 to 12 o'clock. In a poll of some close friends recently, we found out that most of us (>80% including myself) had always mentalized the year rotating counter-clockwise (sta…

I visualize the year clockwise, but with summer at the top, and the new year at the 6 o'clock position. I'm not sure why, but I think it just makes more sense to me to think of spring as rising, and "fall" as descending. I guess that convention would work better in the southern hemisphere.

Same here, but i'm in the southern hemisphere, so summer is at the top already.

Re: Sun Clock

#64
post #33

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/suncalc

Author of Sun Clock here — thanks for the library! I'll check out the new release soon and update.

Re: Sun Clock

#66

Love it! One weird thing: the author of this clock/calendar portrays the year rotating clockwise (click on the calendar icon in top left to see the "annual" calendar): January in 12 to 1 o'clock, February in 1 to 2 o'clock, etc. and December in 11 to 12 o'clock. In a poll of some close friends recently, we found out that most of us (>80% including myself) had always mentalized the year rotating counter-clockwise (sta…

I wonder if that's a common thing generally or not. Definitely I should add it as an option though. Also whether the year starts at the top or bottom of the dial.

The planets do go around the Sun anticlockwise when viewed looking down from above the North pole [0], and most diagrams show it that way, so maybe that's where the idea comes from?

0. e.g. https://en.wikipedia.org/wiki/Year

Re: Sun Clock

#67

Clocks like this are fun. I coded one but couldn’t decide how to handle the corner cases where the sun rises but does not set (and vice versa). You also have to decide if you’re showing the time that the sun rose today or if it should be tomorrow once you’ve already passed that time. Either way, at a certain point you’ll see the UI shift. At moderate latitudes it makes little difference but the effect can be quite ex…

I'd want to make it continuous, but then it wouldn't actually show you proper sunset/sunrise times until the moment they are actually happening, which is probably sacrificing function for form. You could also hide the shift by making the whole thing "tick" rather than having some parts continuous and some quantised.
Post reply on HN