[Remind-Fans] weekly shift rotation

Rob Hamrick rob.hamrick at gmail.com
Thu Jan 22 00:40:55 EST 2009


> Really, what you have is a 28-day cycle, so here's how I would do it:
> 
> FSET _cycle(x) ((x - '2008-12-08') / 7) % 4
> REM Mon Tue Wed Thu Fri SATISFY [_cycle(trigdate()) == 0] MSG late%
> REM Mon Tue Wed Thu Fri SATISFY [_cycle(trigdate()) == 1] MSG off%
> REM Mon Tue Wed Thu Fri SATISFY [_cycle(trigdate()) == 2] MSG early%
> REM Mon Tue Wed Thu Fri SATISFY [_cycle(trigdate()) == 3] MSG swing%

That's beautiful, thanks!  Much better.  -r




> (You may need to adjust the numeric constants so the right shifts show up.)
> By subtracting from a known start date, it should work even across
> multiple years.



More information about the Remind-fans mailing list