[Remind-Fans] Using OMIT for sliding holidays

Paul Pelzl pelzlpj at eecs.umich.edu
Wed May 31 01:55:44 EDT 2006


On Tue, May 30, 2006 at 04:37:50PM -0600, Alan Young wrote:
> For a sliding holiday like Memorial Day, I have the following lines:
> 
> REM 30 May MSG Memorial Day
> REM Mon Jun 1 --7 MSG Memorial Day (observed)
> OMIT 29 May
> 
> REM Mon SKIP AT 10:30 DURATION 0:30 MSG Development Meeting
> REM Mon 1 --7 AFTER AT 13:00 DURATION 1:00 MSG Monthly Update Meeting
> 
> Well enough.  Is there an easy way to say something like AFTER AT
> 13:30 AT 13:00 ?
> (The meeting is bumped to 13:30 on Tuesday if the Monday schedule is
> missed).  If not, it's not a big deal.

The AFTER keyword only delays to a later date, so that won't do the job.
You Can Script It, but my best attempt is a bit ugly:

   FSET _choosetime(normaltime, omittime) iif(isomitted(trigdate()), omittime, normaltime)
   REM Mon 1 --7 SCANFROM [trigger(today()-1)] SATISFY 1
   REM [trigger(trigdate())] AFTER AT [_choosetime("13:00", "13:30")] MSG Monthly Update Meeting


> What I really want to know is, is there a way to do
> 
> OMIT Mon Jun 1 --7

I think this is what you want:

   REM Mon Jun 1 --7 SCANFROM [trigger(today()-7)] MSG Memorial Day (observed)
   OMIT [trigger(trigdate())]

Note that it's not safe to use AFTER with a floating holiday unless you
work some magic with SCANFROM--check the manpage under "DETAILS ABOUT
TRIGGER COMPUTATION".


> As long as I'm asking, is there a way to group OMITS?  What I'm
> looking for is something like
> 
> OMIT-GROUP Company-Holidays
> OMIT date-spec
> OMIT date-spec
> OMIT-GROUP
> 
> REM Mon SKIP Company-Holidays AT 10:30 DURATION 0:30 MSG Dev Meeting
> REM Mon AFTER Company-Holidays AT 13:00 DURATION 1:00 MSG Monthly Mtg

I think your only option is to group these reminders within their own
context:

   PUSH-OMIT-CONTEXT
   CLEAR-OMIT-CONTEXT
   OMIT <date spec>
   OMIT <date spec>
   REM Mon SKIP AT 10:30 DURATION 0:30 MSG Dev Meeting
   REM Mon AFTER AT 13:00 DURATION 1:00 MSG Monthly Mtg
   POP-OMIT-CONTEXT

Hope that helps,

Paul





More information about the Remind-fans mailing list