[Remind-Fans] Cleaning up OMITs

Jorge Luis lists at jorge.cc
Fri Nov 7 14:03:15 EST 2008


With a pointer from David, I built and installed the latest stable
release of remind and read up on the nonomitted function.  I was able to
construct the following statement that calculates my trash day: every
Tuesday except when Monday or Tuesday is a holiday (omitted), in which
case trash day moves to Wednesday.

FSET prev_monday(x) x - wkdaynum(x-1)

REM Tue Wed SATISFY [wkdaynum(trigdate()) == 2 && \
        nonomitted(prev_monday(today()), today()+1) == 2 || \
        wkdaynum(trigdate()) == 3 && \
        nonomitted(prev_monday(today()), today()+1) <= 2] \
        MSG Garbage Day

This works quite well, but it has a glitch that I'm unable to track
down.  If Tuesday is omitted, the calendar outputs "Garbage Day" for
both Tuesday and Wednesday.

It works fine if the omitted day is Monday.

No doubt the LOCAL OMIT function in the development version will make
this sort of calculation a lot easier.  For now I need a cluestick hint
of how to output the message for Wednesday only if Tuesday is omitted,
rather than printing it for both days.

TIA,

        JL
-- 
JL <lists at jorge.cc>
Beware of all enterprises that require new clothes.  -- Thoreau




More information about the Remind-fans mailing list