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 7:29am (EET), sunset 4:38pm (EET) at Espoo, FI (9:08 hours daylight)”
For comparison, Santa’s home area in the north today:
“Sunrise 7:51am (EET), sunset 3:42pm (EET) at Korvatunturi, Finland (7:50 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.