[Remind-Fans] Follow-up on 'counting a recurring event'

David F. Skoll dfs at roaringpenguin.com
Wed Apr 24 09:57:33 EDT 2013


On Wed, 24 Apr 2013 09:16:40 -0400
hymie! <hymie at lactose.homelinux.net> wrote:

> I think the original goal was not to have to calculate by hand the
> "until" date, but to specify "6 sessions", and have the end date
> adjust itself based on intervening "omits".

Oh, I see.  That makes sense, then.  It can be done like this, though
it's a bit inefficient; Remind will spin its wheels trying to satisfy
the SATISFY clause after the last lesson.  Luckily, modern computers
are so fast you don't even notice it.

# Count the lesson number starting from date "x"
FSET lesson_num(x) nonomitted(x, trigdate(), "Mon","Tue","Wed","Thu","Fri","Sat")

PUSH-OMIT-CONTEXT
OMIT 2013-05-19

# 6 lessons, hence "<=6" in SATISFY clause
REM 2013-05-12 *7 AT 18:00 DURATION 1:00 SKIP   \
  SATISFY [lesson_num('2013-05-05') <= 6]         \
  MSG Salsa Level 1 - #[lesson_num('2013-05-05')]

POP-OMIT-CONTEXT

Regards,

David.


More information about the Remind-fans mailing list