Rise and Shine code-golf
The challenge is to create a program which takes a date, a latitude, and a longitude, and prints the time of the sunrise on that date for the given location.
The program must work for any valid date between January 1, 2000, and December 31, 2999.
Internal and external sunrise functions are disallowed. Date libraries are allowed only to format the output into ISO 8601
###Clarifications###
- You do not need to take into account altitude or the refraction of light from the sun.
- Date input and output must be in correct ISO8601 format
- The date, latitude, and longitude will be given as a space separated string, in that order, on stdin
- Printing a value means outputting to stdout
- The output should have a precision of +/- 1 minute
- The time outputted must be in the local time of the location specified, and the time zone offset must be printed along with the date
###Bonus###
- Score * 0.9 if you do not use a date library at all
###Resources###
- http://en.wikipedia.org/wiki/Sunrise_equation
- http://www.esrl.noaa.gov/gmd/grad/solcalc/solareqns.PDF
- http://williams.best.vwh.net/sunrise_sunset_algorithm.htm
###Test Cases###
Input Output
41.8376 -87.6818 2265-03-19 2265-03-19T06:05-06:00
40.6643 -73.9385 2265-03-06 2265-03-06T06:31-05:00
43.65 -79.38 2265-03-14 2265-03-14T06:41-05:00
41.8376 -87.6818 2265-03-05 2265-03-05T06:28-06:00
43.65 -79.38 2265-02-19 2265-02-19T07:19-05:00
43.65 -79.38 2265-02-06 2265-02-06T07:37-05:00
41.8376 -87.6818 2265-02-14 2265-02-14T06:57-06:00
41.8376 -87.6818 2265-02-05 2265-02-05T07:08-06:00
43.65 -79.38 2265-10-19 2265-10-19T06:47-05:00
40.6643 -73.9385 2265-10-06 2265-10-06T06:07-05:00
40.6643 -73.9385 2265-10-14 2265-10-14T06:16-05:00
40.6643 -73.9385 2265-10-05 2265-10-05T06:06-05:00
43.65 -79.38 2265-05-19 2265-05-19T04:58-05:00
43.65 -79.38 2265-05-06 2265-05-06T05:13-05:00
40.6643 -73.9385 2265-05-14 2265-05-14T04:50-05:00
43.65 -79.38 2265-05-05 2265-05-05T05:14-05:00
41.8376 -87.6818 2265-08-19 2265-08-19T05:14-06:00
43.65 -79.38 2265-08-06 2265-08-06T05:23-05:00
43.65 -79.38 2265-08-14 2265-08-14T05:32-05:00
41.8376 -87.6818 2265-08-05 2265-08-05T04:59-06:00
41.8376 -87.6818 2400-03-19 2400-03-19T06:12-06:00
43.65 -79.38 2400-03-06 2400-03-06T07:01-05:00
43.65 -79.38 2400-03-14 2400-03-14T06:47-05:00
40.6643 -73.9385 2400-03-05 2400-03-05T06:39-05:00
40.6643 -73.9385 2400-02-19 2400-02-19T07:01-05:00
40.6643 -73.9385 2400-02-06 2400-02-06T07:17-05:00
40.6643 -73.9385 2400-02-14 2400-02-14T07:08-05:00
43.65 -79.38 2400-02-05 2400-02-05T07:46-05:00
43.65 -79.38 2400-10-19 2400-10-19T06:54-05:00
41.8376 -87.6818 2400-10-06 2400-10-06T06:11-06:00
40.6643 -73.9385 2400-10-14 2400-10-14T06:23-05:00
43.65 -79.38 2400-10-05 2400-10-05T06:38-05:00
43.65 -79.38 2400-05-19 2400-05-19T05:06-05:00
41.8376 -87.6818 2400-05-06 2400-05-06T04:58-06:00
40.6643 -73.9385 2400-05-14 2400-05-14T04:57-05:00
41.8376 -87.6818 2400-05-05 2400-05-05T04:59-06:00
40.6643 -73.9385 2400-08-19 2400-08-19T05:29-05:00
40.6643 -73.9385 2400-08-06 2400-08-06T05:16-05:00
43.65 -79.38 2400-08-14 2400-08-14T05:40-05:00
41.8376 -87.6818 2400-08-05 2400-08-05T05:07-06:00
41.8376 -87.6818 2733-03-19 2733-03-19T06:39-06:00
41.8376 -87.6818 2733-03-06 2733-03-06T07:01-06:00
43.65 -79.38 2733-03-14 2733-03-14T07:15-05:00
43.65 -79.38 2733-03-05 2733-03-05T07:30-05:00
40.6643 -73.9385 2733-02-19 2733-02-19T07:27-05:00
40.6643 -73.9385 2733-02-06 2733-02-06T07:43-05:00
41.8376 -87.6818 2733-02-14 2733-02-14T07:30-06:00
40.6643 -73.9385 2733-02-05 2733-02-05T07:44-05:00
40.6643 -73.9385 2733-10-19 2733-10-19T06:55-05:00
41.8376 -87.6818 2733-10-06 2733-10-06T06:37-06:00
41.8376 -87.6818 2733-10-14 2733-10-14T06:46-06:00
43.65 -79.38 2733-10-05 2733-10-05T07:04-05:00
41.8376 -87.6818 2733-05-19 2733-05-19T05:12-06:00
40.6643 -73.9385 2733-05-06 2733-05-06T05:33-05:00
40.6643 -73.9385 2733-05-14 2733-05-14T05:25-05:00
43.65 -79.38 2733-05-05 2733-05-05T05:49-05:00
40.6643 -73.9385 2733-08-19 2733-08-19T05:55-05:00
41.8376 -87.6818 2733-08-06 2733-08-06T05:35-06:00
41.8376 -87.6818 2733-08-14 2733-08-14T05:43-06:00
40.6643 -73.9385 2733-08-05 2733-08-05T05:42-05:00
40.6643 -73.9385 2455-03-19 2455-03-19T06:21-05:00
40.6643 -73.9385 2455-03-06 2455-03-06T06:42-05:00
41.8376 -87.6818 2455-03-14 2455-03-14T06:24-06:00
40.6643 -73.9385 2455-03-05 2455-03-05T06:43-05:00
43.65 -79.38 2455-02-19 2455-02-19T07:30-05:00
40.6643 -73.9385 2455-02-06 2455-02-06T07:20-05:00
40.6643 -73.9385 2455-02-14 2455-02-14T07:11-05:00
40.6643 -73.9385 2455-02-05 2455-02-05T07:21-05:00
40.6643 -73.9385 2455-10-19 2455-10-19T06:32-05:00
41.8376 -87.6818 2455-10-06 2455-10-06T06:14-06:00
40.6643 -73.9385 2455-10-14 2455-10-14T06:27-05:00
41.8376 -87.6818 2455-10-05 2455-10-05T06:13-06:00
41.8376 -87.6818 2455-05-19 2455-05-19T04:48-06:00
43.65 -79.38 2455-05-06 2455-05-06T05:24-05:00
40.6643 -73.9385 2455-05-14 2455-05-14T05:01-05:00
41.8376 -87.6818 2455-05-05 2455-05-05T05:03-06:00
41.8376 -87.6818 2455-08-19 2455-08-19T05:25-06:00
41.8376 -87.6818 2455-08-06 2455-08-06T05:12-06:00
43.65 -79.38 2455-08-14 2455-08-14T05:43-05:00
43.65 -79.38 2455-08-05 2455-08-05T05:33-05:00
41.8376 -87.6818 2015-03-19 2015-03-19T05:57-06:00
40.6643 -73.9385 2015-03-06 2015-03-06T06:23-05:00
41.8376 -87.6818 2015-03-14 2015-03-14T06:06-06:00
43.65 -79.38 2015-03-05 2015-03-05T06:49-05:00
41.8376 -87.6818 2015-02-19 2015-02-19T06:42-06:00
43.65 -79.38 2015-02-06 2015-02-06T07:30-05:00
41.8376 -87.6818 2015-02-14 2015-02-14T06:49-06:00
40.6643 -73.9385 2015-02-05 2015-02-05T07:03-05:00
40.6643 -73.9385 2015-10-19 2015-10-19T06:12-05:00
40.6643 -73.9385 2015-10-06 2015-10-06T05:58-05:00
41.8376 -87.6818 2015-10-14 2015-10-14T06:03-06:00
41.8376 -87.6818 2015-10-05 2015-10-05T05:53-06:00
40.6643 -73.9385 2015-05-19 2015-05-19T04:37-05:00
41.8376 -87.6818 2015-05-06 2015-05-06T04:42-06:00
40.6643 -73.9385 2015-05-14 2015-05-14T04:41-05:00
40.6643 -73.9385 2015-05-05 2015-05-05T04:51-05:00
41.8376 -87.6818 2015-08-19 2015-08-19T05:04-06:00
43.65 -79.38 2015-08-06 2015-08-06T05:13-05:00
43.65 -79.38 2015-08-14 2015-08-14T05:22-05:00
43.65 -79.38 2015-08-05 2015-08-05T05:12-05:00
This is code-golf, so least bytes wins.