[Remind-Fans] Better way to do "every other weekend"?

Dianne Skoll dianne at skoll.ca
Mon Jul 12 15:37:28 EDT 2021


On Mon, 12 Jul 2021 13:40:32 -0500
Tim Chase via Remind-fans <remind-fans at lists.skoll.ca> wrote:

> Over on Mastodon I was recently asked how to put an event on "every
> other weekend".  This is what I came up with:

>   REM Sat Sun SATISFY ((abs($T - date(2021,7,10)) % 14) < 2)
>   IF trigvalid()
>     REM [$T] MSG Every other weekend
>   ENDIF

That works, but I'd write it more succinctly as:

REM Sat Sun FROM 2021-07-10 SATISFY [(($T - '2021-07-10') % 14) < 2] MSG Every other weekend

(My solution differs from yours in that we only
start the reminders on 2021-07-10; we don't issue
any before that start date.)

In an expression, you can write a date constant
as 'yyyy-mm-dd' rather than date(yyyy, mm, dd), which
I find easier to read.

Regards,

Dianne.


More information about the Remind-fans mailing list