[Remind-Fans] dawn,sunrise,sunset, dusk -- solar_noon??
Dianne Skoll
dianne at skoll.ca
Sat Oct 10 10:34:21 EDT 2020
On 2020-10-10 07:01, remind-fans at trodman.com wrote:
> How about adding
> noon_solar() ?
> Right now, might I be able to do the math all in remind, and bisect the
> sunrise(),sunset() interval?
Yep. I believe solar noon is defined as halfway between sunrise and
sunset, so this will do the trick:
FSET solarnoon(x) sunrise(x) + (sunset(x)-sunrise(x))/2
MSG Sunrise: [sunrise($T)]; Sunset: [sunset($T)]; Solar noon: [solarnoon($T)]
Note that because of how Remind converts types, the simpler:
FSET solarnoon(x) (sunrise(x) + sunset(x)) / 2
will not work. You cannot divide a time by an integer, so you get:
`/': Type mismatch
However, subtracting two times yields an integer, which *can* be divided
by two, and you can add an integer to a time, so it all works out.
Regards,
Dianne.
More information about the Remind-fans
mailing list