Sunrise and sunset calculations for JavaScript