[Remind-Fans] Avoid type errors when using trigdatetime in msgprefix

Dianne Skoll dianne at skoll.ca
Tue Mar 31 19:51:14 EDT 2020


On 2020-03-31 17:49, Tim Chase wrote:

> You might be able to abuse the fact that remind zero-pads times when
> converting them to strings, meaning you can compare their
> string-versions and you should get the same results

That's clever, and it should work just fine!  For my own sanity, I would
factor out the complex bit, something like this:

FSET _indicator(t) iif(t == 0, " ", iif(t + "" >= realnow() + ""), ">", "*");
FSET msgprefix(x) " " + _indicator(trigtime()) + " "

(This logic isn't actually what the OP wanted, but fixing that is left
as an exercise...)

Regards,

Dianne.


More information about the Remind-fans mailing list