Supply some geographic information to this script and it returns 'day' or 'night' according to the given locations sunrise/sunset. This script shall be used for layout switches: Doing this by the hour is bad practise as it does not consider varying day lengths. Examples are included in the source code.
if (hour == 1)
body.bgcolor="#FFffFF";
if (hour == 2)
body.bgcolor="#EEeeEE";
Users browsing this forum: No registered users and 190 guests