For those who are curious, here is the basic function in AppleScript for calculating sunrise and sunset times given latitude, longitude, and time of day. I adapted it from this document published by the NOAA.
____
-- Function to determine sunrise and setset times (in seconds) given latitude...