So I’ve read through the previous discussion which essentially boiled down to “OH is event driven so events are supposed to be surprises and we can’t think of a possible use case where you would want to know when the next predictable event is going to occur (even though you have given us one). Besides, the astro binding is already too big as it is.”
Except that nobody seems that have actually looked at the astro binding code and noticed the lines:
Sun sunYesterday = getSunInfo(addDays(calendar, -1), latitude, longitude, altitude, true, useMeteorologicalSeason);
Sun sunTomorrow = getSunInfo(addDays(calendar, 1), latitude, longitude, altitude, true, useMeteorologicalSeason);
So, the astro binding already calculates the sun information for the previous and following days. In fact, it even publishes that information in the many available (undocumented) channels.
My gripe is that this question/request was fobbed off with a ‘too hard/can’t do it’ response four years ago by people who didn’t really look for the solution. Anyone asking the question just gets referred back to the original discussion. Anybody doing due diligence research on the question would have seen this and taken it as the accepted answer when in fact the data is already calculated and published.
So, for anyone looking for the answer to can you get tomorrow’s sunrise or yesterday’s sunset, they are available as:
astro:sun:Sun:morningNight#start
- sun set yesterday
astro:sun:Sun:night#end
- sun rise tomorrow
Note that these times are calculated using Astronomical twilight, so you may need to offset by up to +/- 1.5hr depending on your latitude to get the actual sunrise/sunset.