[Remind-Fans] Week Numbers. (solved)

David F. Skoll dfs at roaringpenguin.com
Sun Mar 21 10:47:44 EDT 2010


Geoff wrote:

[some complex Remind code]

I think you are fighting against the Remind algorithm.  What you are
really trying to implement is an inverse of the built-in weekno()
function, and there's no nice way to do this.  (It should probably be
done in C.)

You should be using SATISFY-clause reminders like this:

#=========================================================
# Only works on Remind 03.01.08 or newer.  Replace $T with
# trigdate() on older versions.
FSET _isweek(x) weekno($T) == x

REM Mon Tue Wed Thu Fri SATISFY [_isweek(9)] MSG Weekdays in week 9.
REM SATISFY [_isweek(1)] MSG All week of week 1.

# ... etc.
#=========================================================

Also... to get the "-n" option to work, you need to increase the
maximum SATISFY iteration count from the default of 150.  Something like:

SET $MaxSatIter 500

at the top of the file will work.  Yeah, that's hacky.

Regards,

David.



More information about the Remind-fans mailing list