On Fri, 6 Apr 2018 20:21:51 -0500
Tim Chase <rem...@tim.thechases.com> wrote:
> Is there some way to scan backwards for any OMITs that occur during
> the weekdays on/prior to a given trigger-date?
I had to solve this *exact* problem. Here's my solution:
# Set garbday to the usual weekday of garbage collection where
# Monday == 1 and Friday == 5. Set garbdayname to the matching
# day name.
# Example below: Friday
set garbday 5
set garbdayname "Friday"
fset _garbhol(x) wkdaynum(x) == garbday && slide(x-garbday, garbday) != x
fset _garbdel() iif($Tw != garbday, " (Delayed)", "")
REM [garbdayname] AFTER OMITFUNC _garbhol MSG Garbage[_garbdel()]
To understand how this works, you'll need to look up the OMITFUNC clause
and the "slide" function definition. And translate from Canadian ("garbage")
to American ("trash") :)
The basic idea is that the _garbhol function returns 1 if any of the
preceding weekdays (including this one) is OMITted, and 0 otherwise.
Remind-fans mailing list
Remind is at http://www.roaringpenguin.com/products/remind