Seriously-overarchitected code that reads the USNO sunrise / sunset data (from file sunrise_sunset), llooks up the sunrise & sunset times for today, then - after the bits have gone round & round for a while - tests whether the current time lies between the two.

Actually compares now to (sunrise - five minutes) and (sunset + five minutes), because when conditions are marginal I'd rather have a dark picture than no picture at all.

(This is the sort of code that happens when I'm bored. The only way to redeem myself after perpetrating this horrow would be to rewrite the whole thing in JavaScript, and actually calculate sunrise & sunset times from USNO formulae. Perhaps I will do that, someday.)