On Thu, 21 Jul 2016 15:48:03 +0200
Anne Wainwright <[email protected]> wrote:

> 1:  If the holiday falls on a Sunday, then it moves to the Monday

This is done as follows:

# Figure out the date of the holiday.  We scan back from
# 30 days to make sure we always get *this* year's holiday
# rather than *next* year's holiday for the sake of dependent
# reminders
REM 1 May SCANFROM [today()-30] OMIT Sun AFTER SATISFY 1
OMIT [trigdate()] MSG Worker's Day

> 2:  If the Monday is a public holiday then Dustbin Day moves to the
> Friday (or onwards past the weekend if that is also a holiday).

Do you mean the previous Friday?  Or the next Friday?  I think next.

If the next Friday:

# The normal non-holiday case
REM Monday SATISFY [!isomitted($T)] MSG Dustbin Day

# The holiday case
REM Friday SATISFY [isomitted($T-4) && !isomitted($T)] MSG Dustbin Day (moved)

The first one triggers every Monday that is *not* a holiday.

The second one triggers on every Friday that is *not* a holiday, but where
the previous Monday *is* a holiday.

The lesson from all of this is that SATISFY is usually the way to
go for very unusual rules.

Regards,

Dianne.

PS: I am originally from South Africa and it's so nice to hear someone
call garbage day "Dustbin day" :)
_______________________________________________
Remind-fans mailing list
[email protected]
http://lists.roaringpenguin.com/cgi-bin/mailman/listinfo/remind-fans
Remind is at http://www.roaringpenguin.com/products/remind

Reply via email to