Calculate sunrise/set and dusk/dawn times with JavaScript.