On Mon, 6 Feb 2012 18:51:41 +0200
Rod Johnson <[email protected]> wrote:

> in 2012 mydate is the 20 April
> in 2013 mydate is the 28 April

> If mydate is before the 23 of April then I need to be reminded of an
> appointment on the 23 of April. (as in 2012)
> If mydate is after the 23 of April then I need to be reminded of an
> appointment on the first Monday after mydate. (as in 2013)

Ok... those requirements are somewhat odd, but I'd write it like this:

SET mydate '2012-04-20'
#SET mydate '2013-04-28'

# Find out when mydate triggers
REM [mydate] SATISFY 1

# Adjust
IF $Tm > 4 || ($Tm == 4 && $Td > 23)
   REM Monday [mydate] MSG First Monday after mydate
ELSE
   REM [mydate] MSG Actually on mydate
ENDIF

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

Reply via email to