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 5:42am (EEST), sunset 8:56pm (EEST) at Espoo, FI (15:14 hours daylight)”
For comparison, Santa’s home area in the north today:
“Sunrise 4:41am (EEST), sunset 9:25pm (EEST) at Korvatunturi, Finland (16:44 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.