Returns true if called when it's light outside based on location calculations of sunrise/sunset times and your adjustment of them in the preferences dialog.
daylight
returns boolean true if it's daylight outside.
if not (daylight) then turnon "some outside lights" end if