[Remind-Fans] an OMIT holiday moves forward Sun to Mon, Monday things that should move forward don't.

Dianne Skoll dfs at roaringpenguin.com
Thu Jul 21 10:00:54 EDT 2016


On Thu, 21 Jul 2016 15:48:03 +0200
Anne Wainwright <anotheranne at fables.co.za> 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" :)


More information about the Remind-fans mailing list