[Remind-Fans] jump forward by x working days

Tarlika Elisabeth Schmitz remind at numerixtechnology.de
Wed Jun 10 18:07:29 EDT 2009


On Thu, 07 May 2009 22:18:36 -0400
"David F. Skoll" <dfs at roaringpenguin.com> wrote:

>Tarlika Elisabeth Schmitz wrote:
>
>> On the last day of the quarter or, if this is not a working day, on
>> the next working day, interest is sent from a savings account to
>> another bank account. The money arrives on the 3rd working day (=2
>> working days later).
>
>> On the day of receipt I need a reminder.
>
>> Example 1: interest sent on Wednesday 31st Dec 2008 arrives on 5th
>> Jan skipping New Year bank holiday and weekend.
>
>> Example 2: interest credited on Saturday 31st March will be sent on
>> Monday 2nd Apr and arrive Wednesday.
>
>This is what I came up with.  It seems to work, but I haven't tested
>it thoroughly.  It's also bizarre enough that I'm starting not to
>understand it myself!
>
>Regards,
>
>David.
>
>#
>========================================================================
>OMIT 1 Jan MSG New Year's Day
>
>SET payday evaltrig("31 Dec OMIT Sat Sun AFTER", today() - 31)
>REM [trigger(payday)] OMIT Sat Sun AFTER SCANFROM [trigger(payday)] *1
>\
>  SATISFY [nonomitted(payday, trigdate(), "Sat", "Sun") == 2 ] \
>  MSG Interest Received
>
># Replace 31 Dec in the SET command with 31 Mar, 30 Jun and 30 Sep and
># repeat the following REM for the other quarters.



I managed to avoid repeating the reminders for every quarter:

REM 1 -1 SCANFROM [trigger(today()-7)]
SET payday trigdate()
REM [trigger(payday)] OMIT Sat Sun AFTER SCANFROM [trigger(payday)] *1 \
SATISFY [(nonomitted(payday, trigdate(), "Sat", "Sun") == 2) && \
         (monnum(trigdate()) % 3 == 1) ] \
  MSG Interest Received %v


============
I don't know whether I could have done this with evaltrig().

There is one thing I don't understand though:
Why does the expression in the SATISFY clause have to be put in square
brackets?

The example from the manual does not use square brackets:
REM 13 SATISFY wkdaynum(trigdate()) == 5



-- 


Best Regards,

Tarlika Elisabeth Schmitz


A: Because it breaks the logical sequence of discussion
Q: Why is top posting bad? 



More information about the Remind-fans mailing list