A Sunset Clock

About this time every year I start to get obsessed with the sunset. Since we’re close to the equinox, the sunlight is disappearing at the fastest rate we’ll see all year. This fact alone separates me from the people who talk about autumn as their favorite season. Beautiful colors, apples and pumpkins, crisp temperatures, and clear blue skies. Sure. I won’t say those things aren’t nice. But the darkness creeps in like a mist. It smiles an oily smile as it unfolds umbrellas and spreads out blankets, because it knows with celestial mechanical precision that nothing but December can dislodge it. And December is on vacation. December is somewhere far away, drinking margaritas and playing poker with Santa Claus.

Anyway: sunsets.

I wanted to boost my Javascript skills, and I wanted to learn about Github, so I wrote a little program to show how fast the sunsets were ebbing noonward.

Here it is: http://www.starchamber.com/sunset/


It uses browser geo-location to figure out where you are. If it succeeds, it can calculate sunset times accurately. It shows you today’s sunset and tomorrow’s so you get a sense of how fast things are changing. As a bonus, a stylized clock face shows two weeks’ worth of sunset times in blue. Finally, it shows you how long until the earliest sunset. At my latitude, that’s December 9th, a mere 80 days away! At your latitude, it may well be different. And I should mention that this page is possible because of Preston Hunt’s excellent SunriseSunset Javascript class. I had been working with some old Naval Observatory code, but it was miserable work cleaning it up. Preston came along and saved the day.

And if you want to help me fix it or report a bug, here is the Github repository: https://github.com/gulley/Sunset-Visualization

Fork away!

LATE-BREAKING NEWS: I want to pass on my grateful acknowledgment of help from David Wey and Josh Natanson who, sure enough, did fork and improve my code on Github. Y’know, there’s something to this collaboration business. It’s a real rush when somebody magically reaches out and helps you fix something that you created. Thanks guys!

One thought on “A Sunset Clock”

  1. Very creative idea and nice implementation! Thanks for the plug for my SunriseSunset code. It always makes me very happy when others are able to use my work to make something interesting.

Comments are closed.