[Remind-Fans] Cleaning up OMITs

David F. Skoll dfs at roaringpenguin.com
Fri Nov 7 15:25:17 EST 2008


Jorge Luis wrote:

[some stuff]

This code appears to work correctly in all cases.

Regards,

David.

FSET prev_monday(x) x - wkdaynum(x-1)

# It is garbage day IFF:
# 1) It's Tuesday, and neither Monday nor Tuesday is a holiday, OR
# 2) It's Wednesday, and at least one of Monday or Tuesday was a holiday
FSET garbage_day(x) \
  wkdaynum(x) == 2 && nonomitted(prev_monday(x), x+1) == 2 || \
  wkdaynum(x) == 3 && nonomitted(prev_monday(x), x) < 2

REM Tue Wed SATISFY [garbage_day(trigdate())] MSG Garbage Day



More information about the Remind-fans mailing list