View daylight hours
Apr 26, 2009 in Howto
The hours of daylight change a lot in our country. The northernmost parts are above the Arctic Circle and there it’s even quite extreme:
In the summer the sun does not go down at all, and in the darkest winter, during the arctic night, it doesn’t rise.
Here are the sun-times of my location in the south today: (Ihave noticed that sometimes the page needs to be refreshed to show correctly, don’t know why)
“Sunrise 3:57am (EEST), sunset 10:47pm (EEST) at Espoo, FI (18:49 hours daylight)”
For comparison, Santa’s home area in the north today:
“No sunrise, no sunset at Korvatunturi, Finland (24:00 hours daylight)”
Then why publish this information here? This kind of information is normally published in services like meteorological institutes and such.
I got interested in how to get and display this information.
I learned that Emacs has a feature built in that generates this data. The following step was to get it printed out. And of course The Usenet, once again, was the source of knowledge.
A tiny emacs script is used here and then a php function called file_get_contents. I’ll put the details on line as soon as I’ve straightened it all out, I’m still working on shaping the output a bit.
Vahis




