On Tue, 02 Dec 2025 19:14:20 +0100
Damien Wertz via Remind-fans <[email protected]> wrote:
> OMIT Jan 1
> REM [multitrig("Jan 1", "Jul 1")] AFTER MSG %y-%n-%d (1)
> REM [multitrig("Jan 1 AFTER", "Jul 1 AFTER")] MSG %y-%n-%d (2)
> output:
> Reminders for Friday, 2nd January, 2026:
> 2026-1-2 (2)
> Reminders for Wednesday, 1st July, 2026:
> 2026-7-1 (1)
> 2026-7-1 (2)
> Is this expected or a bug? Thank you very much!
It is expected, and you can see what's going on if you run it
with the "-dx" debug flag. (Maybe -dxt to debug triggers as well...)
Consider the run on 2026-01-02:
===============================
First consider the expression:
multitrig("Jan 1", "Jul 1")
On 2026-01-02, the "Jan 1" trigger has a trigger date of 2027-01-01
because the multitrig knows nothing about AFTER, and the "Jul 1" trigger
has a trigger date of 2026-01-01. So the return value of the entire
multitrig function is 2026-07-01 and that does not trigger on
2026-01-02.
Next consider the expression:
multitrig("Jan 1 AFTER", "Jul 1 AFTER")
In this case, "Jan 1 AFTER" has a trigger date of 2026-01-02 because
the AFTER *does* move it past the OMITted date. "Jul 1 AFTER" has
a trigger date of 2026-07-01, and because 2026-01-02 is closer to today
than 2026-07-01, the return value of the entire multitrig function is
2026-01-02. The second reminder therefore triggers.
I'll leave the run on 2026-07-01 as an exercise for the reader. :)
(Hint: remind -dxt is your friend.)
Regards,
Dianne.
_______________________________________________
Remind-fans mailing list
[email protected]
https://dianne.skoll.ca/mailman/listinfo/remind-fans
Remind is at https://dianne.skoll.ca/projects/remind/