GNU Octave can be used as a programmable calculator. Here, you can download an Octave script that can calculate sunrise and sunset time for any location on earth.
The algorithm used is from here.
Download the sunrise-sunset script.
When I run the script for Mumbai, I get the following output at Octave prompt: I use the command “diary” (How to use “diary”?) to record these results.
Give year number: 2015 year = 2015 Give month number: 7 month = 7 Give date: 10 date = 10 Give longitude of your location in deg: 72.8258 longitude = 72.826 Give latitude of your location in deg: 18.975 latitude = 18.975 ============================================= Here is the Sunrise time: rise_hours = 6 rise_minutes = 13.920 rise_seconds = 55.173 ============================================= Here is the Sunset time: set_hours = 19 set_minutes = 11.924 set_seconds = 55.455 =============================================