diff --git a/examples/defs.rem b/examples/defs.rem index 77661f8d..a872be8a 100644 --- a/examples/defs.rem +++ b/examples/defs.rem @@ -508,7 +508,13 @@ IF !InIsrael && !Reform [_h(22, "Nisan")] MSG %"Pesach 8%" ENDIF -[_PastSun(27, "Nisan")] ++4 MSG %"Yom HaShoah%" is %b. +REM [_PastSun(27, "Nisan")] SATISFY 1 + +IF $Tw == 5 + REM [_PastSun(26, "Nisan")] ++4 MSG %"Yom HaShoah%" is %b. +ELSE + REM [_PastSun(27, "Nisan")] ++4 MSG %"Yom HaShoah%" is %b. +ENDIF # If 4 Iyar is a Friday, then Yom Hazikaron is # the Wednesday before and Yom Ha'atzmaut is on diff --git a/src/calendar.c b/src/calendar.c index c4d94165..e678a090 100644 --- a/src/calendar.c +++ b/src/calendar.c @@ -770,7 +770,10 @@ static int DoCalRem(ParsePtr p, int col) if (trig.typ == NO_TYPE) return E_EOLN; if (trig.typ == SAT_TYPE) { r=DoSatRemind(&trig, &tim, p); - if (r) return r; + if (r) { + if (r == E_EXPIRED) return OK; + return r; + } if (!LastTrigValid) return OK; r=ParseToken(p, &buf); if (r) return r; diff --git a/src/dorem.c b/src/dorem.c index fc30a842..b4644068 100644 --- a/src/dorem.c +++ b/src/dorem.c @@ -66,7 +66,10 @@ int DoRem(ParsePtr p) PurgeEchoLine("%s\n", "#!P: Cannot purge SATISFY-type reminders"); PurgeEchoLine("%s\n", CurLine); r=DoSatRemind(&trig, &tim, p); - if (r) return r; + if (r) { + if (r == E_EXPIRED) return OK; + return r; + } if (!LastTrigValid) return OK; r=ParseToken(p, &buf); if (r) return r; @@ -962,7 +965,7 @@ int DoSatRemind(Trigger *trig, TimeTrig *tim, ParsePtr p) if (r == E_CANT_TRIG) return OK; else return r; } if (jul == -1) { - return OK; + return E_EXPIRED; } s = p->pos; r = EvaluateExpr(p, &v);