[Remind-Fans] Dynamically calculating the advanced-warning

Dianne Skoll dianne at skoll.ca
Wed Dec 11 12:57:19 EST 2019


On 2019-12-11 11:38, Tim Chase wrote:
> There are some folks that I usually only see on Sundays and would like
> advanced warning if their birthday is in the following week so I can
> wish them a happy birthday.  However I was hoping to only get the
> notification on Sunday, so my thought was something like

>   REM Dec 12 ++[iif(wkdaynum($U) == 0, wkdaynum($T), 0)] \
>     MSG %"Pat's birthday%"%

> ("if today is Sunday, then give me wkdaynum(their actual birthday)
> days of advance notice, otherwise, don't give me advance notice")

> However $T isn't available at that point yet.

Wouldn't this effectively do what you want?

REM Dec 12 ++[iif(wkdaynum($U) == 0, 7, 0)] MSG %"Pat's birthday%"%

Regards,

Dianne.


More information about the Remind-fans mailing list