[Remind-Fans] Dynamically calculating the advanced-warning

Tim Chase remind at tim.thechases.com
Thu Dec 12 21:24:06 EST 2019


On 2019-12-11 12:57, Dianne Skoll wrote:
> On 2019-12-11 11:38, Tim Chase wrote:
> > "if today is Sunday, then give me wkdaynum(their actual birthday)
> > days of advance notice, otherwise, don't give me advance notice"
> 
> Wouldn't this effectively do what you want?
> 
> REM Dec 12 ++[iif(wkdaynum($U) == 0, 7, 0)] MSG %"Pat's birthday%"%

Ah, that does simplify it a lot.  It didn't occur to me that I don't
really need to be precise about the number of days of notice because
it would only do that on the designated day of the week.

Experimentation shows it needs to be 6 rather than 7, otherwise, I
get notified on Sunday of birthdays that happen the following Sunday,
but otherwise, it works great and is a lot tidier.

Thanks!

-Tim






More information about the Remind-fans mailing list