Subject: | RFC: Expose simple API to compute sunrise and sunset times for a given date |
Most of the times I don't ever use recurrences to compute sunrise
and sunset times -- instead, just one day's worth of sunrise and
sunset time is usually all I need. It would be nice if there was
a way to directly compute this.
Looking at the source, it almost looks like sunrise_sunset() does
what I need, a) it's not documented, and b) it looks like it's
just a helper routine.
Cleaning it up some to allow an interface along the lines of
my $sunrise = DateTime::Event::Sunrise->new(...);
my($rise_dt, $set_dt) = $sunrise->sunrise_sunset($dt);
Or
my($rise_dt, $set_dt) = DateTime::Event::Sunrise->new(
longitude => $lo,
latitude => $la,
altitude => $a,
iteration => $i
datetime => $dt
);
would be very nice.