[Remind-Fans] OMIT syntax (was Re: A-Day / B-Day)

Dianne Skoll dianne at skoll.ca
Tue Aug 27 10:53:37 EDT 2024


On Tue, 27 Aug 2024 09:39:16 -0500
Tim Chase via Remind-fans <remind-fans at lists.skoll.ca> wrote:

> Testing this didn't make a difference -- both $Tw and $Uw exhibited
> the same (desired) behavior of not displaying the "Christmas Break"
> message on weekends.  [confused face]

Yup.  If you run in debugging mode, you can see the difference:

Using $Uw:

$ remind -dt  /tmp/x.rem  28 dec 2024
/tmp/x.rem(3): Trig = Saturday, 28 December, 2024
/tmp/x.rem(3): Trig = Sunday, 29 December, 2024
/tmp/x.rem(3): Trig = Monday, 30 December, 2024
/tmp/x.rem(3): Trig = Tuesday, 31 December, 2024
/tmp/x.rem(3): Trig = Wednesday, 1 January, 2025
/tmp/x.rem(3): Trig = Thursday, 2 January, 2025
/tmp/x.rem(3): Trig = Friday, 3 January, 2025
/tmp/x.rem(3): Trig = Saturday, 4 January, 2025
/tmp/x.rem(3): Trig = Sunday, 5 January, 2025
/tmp/x.rem(3): Trig = Monday, 6 January, 2025
/tmp/x.rem(3): Expired
No reminders.

Using $Tw:

$ remind -dt  /tmp/y.rem  28 dec 2024
/tmp/y.rem(3): Trig = Saturday, 28 December, 2024
/tmp/y.rem(3): Trig = Sunday, 29 December, 2024
/tmp/y.rem(3): Trig = Monday, 30 December, 2024
/tmp/y.rem(3): Trig(satisfied) = Monday, 30 December, 2024
No reminders.

So yeah, it happens to work for your specific case because it makes
no difference if Remind thinks the reminder has expired or is just
going to trigger on a different day from today.

> Is there some better way I should have expressed this "OMIT the
> range of dates, but only display the message on weekdays"?

The way you did it is fine, though I'd use $Tw rather than $Uw.  If you
have a SATISFY clause and the expression doesn't somehow involve the
trigger date (trigdate() or one of the $T variables) then it's probably
wrong.  I might look into diagnosing that, other than for the case of
SATISFY 1

Regards,

Dianne.


More information about the Remind-fans mailing list