On Tue, 23 Apr 2013 21:47:42 -0400
Roger <[email protected]> wrote:
> PUSH-OMIT-CONTEXT
> ⋅OMIT 2013-05-19
> SET SALSALESSON 0 # Doesn't appear to be required as seems to
> have no effect
> IF today() >= '2013-05-12'
> ⋅SET SALSALESSON
> nonomitted('2013-05-12',today(),"Mon","Tue","Wed","Thu","Fri","Sat")
> ⋅IF SALSALESSON < 6
> ⋅REM FROM 2013-05-12 AT 18:00 DURATION 1:00 SKIP MSG Salsa
> Level 1 – #[SALSALESSON + 1] %3
> ENDIF
> ⋅ENDIF
> POP-OMIT-CONTEXT
That's fairly clever, but it can be simplified to:
PUSH-OMIT-CONTEXT
OMIT 2013-05-19
# Count Sundays from the week before first lesson
# until today. Use max(...) to avoid error if current
# date < 2013-05-05
SET SALSALESSON nonomitted('2013-05-05', max('2013-05-05', today()),
"Mon","Tue","Wed","Thu","Fri","Sat")
REM 2013-05-12 *7 UNTIL 2013-06-23 AT 18:00 DURATION 1:00 SKIP MSG Salsa Level
1 - #[SALSALESSON]
POP-OMIT-CONTEXT
Regards,
David.
_______________________________________________
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