[Remind-Fans] A-Day / B-Day
Dianne Skoll
dianne at skoll.ca
Tue Aug 27 10:06:20 EDT 2024
On Tue, 27 Aug 2024 09:58:40 -0400
Hymie! via Remind-fans <remind-fans at lists.skoll.ca> wrote:
> >But trigvalid() will always be true. Remind is always able to
> >calculate a trigger date for:
> > rem 2024-08-27 *2 SKIP SATISFY 1
> I'm confused. I through trigvalid() will be false on 2024-08-28.
Nope. trigvalid() simply means that Remind was able to calculate a trigger
date. You want to compare trigdate() to today(). [Actually, you don't.
This is a bad, non-Remind way of doing things because you're subverting
Remind's normal algorithm. Use my solution instead.]
> I thought it was the same as this construct:
> rem 2021-04-21 *56 until 2099-12-31 SATISFY 1·
> if (trigvalid())
> SET ebhpasswd trigdate()
> rem [ebhpasswd] SPECIAL COLOR 255 0 0 Ehymowitz Password Changes
> endif
In that construct, we're using the previously-calculated tigger date.
In your original construct, you're ignoring trigdate().
But it's not a good solution anyway. Why not use the simpler:
REM 2021-04-21 *56 SPECIAL COLOR 255 0 0 Ehymowitz Password Changes
Here are a couple of rules of thumb: If you're checking trigvalid(),
you're probably doing it wrong. If you're assigning trigdate() to a
variable, you're probably doing it wrong. This is what my reminder
files look like:
$ wc -l *.rem | grep total
465 total
$ cat *.rem | grep -ic trigvalid
0
Regards,
Dianne.
More information about the Remind-fans
mailing list