On 2020-10-10 06:01, [email protected] wrote:
> Thanks for
>
> dusk([dq_date]) and dawn(),sunrise(),sunset()
>
> How about adding
>
> noon_solar() ?
>
> Right now, might I be able to do the math all in remind, and bisect
> the sunrise(),sunset() interval?
Indeed, you can do all the math in Remind, exactly as you describe by
bisecting sunrise & sunset. The only trick is that Remind doesn't
like to add or divide TIME types, so you have to convert them to the
minute-of-the-day, average/bisect them, and then convert it back to a
time. But once you know that, writing such an FSET to create
noon_solar() isn't too bad:
FSET tomins(t) (hour(t) * 60) + minute(t)
FSET frommins(i) time(i / 60, i % 60)
FSET noon_solar(dt) frommins(( \
tomins(sunrise(dt)) + tomins(sunset(dt)) \
) / 2)
MSG %"Solar noon: [noon_solar($T)]%"%
Hope this helps,
-tim
_______________________________________________
Remind-fans mailing list
[email protected]
https://dianne.skoll.ca/mailman/listinfo/remind-fans
Remind is at https://dianne.skoll.ca/projects/remind/