[Remind-Fans] remind+wyrd && in-advance reminders
Daniel Graham
daniel.graham at duke.edu
Wed Jan 17 17:26:30 EST 2007
There's an alternative to patching remind for getting in-advance reminders. Suppose, for example,
that your reminders file includes
[snip]
REM [float(2007,Jan,19,2)] MSG %"Paint bookshelf%"
[snap]
Then the monthly (rem2ps) calendar for January would have the entry 'Paint bookshelf' on the 19th.
The daily entry from running rem and the right column of wyrd would show
on January 17th:
Paint bookshelf (in 2 days)
on Jan 18th:
Paint bookshelf (tomorrow)
on Jan 19th:
Paint bookshelf (today)
on Jan 20th:
Paint bookshelf (yesterday)
and so forth.
Additionally, if multiple 'floats' appear in a listing, they would be ordered by their due dates.
To get this just include the following in your reminders file before the first use of "float":
------------------- begin cut ------------------------------------
IF ($CalMode || $PSCal )
# For Cal and PS calendars, only trigger the event on the due date.
FSET float(y,m,d,n) trigger(date(y,m,d))
ELSE
# For Simple Calendar (rem -s) and other modes, also set warning trigger,
# priority and suffixes.
FSET float(y,m,d,n) iif(date(y,m,d) == today(), trigger(today()) + \
" PRIORITY 1000", trigger(MAX(realtoday(), date(y,m,d)-n)) \
+ iif(n >= date(y,m,d) - realtoday(), " PRIORITY " \
+ (1000 + (date(y,m,d) - realtoday())), \
"")))
FSET msgsuffix(x) iif(0 > x, " ", \
998 >= x, " (" + (1000-x) + " days ago)", \
999 >= x, " (yesterday)", \
1000 >= x, " (today)", \
1001 >= x, " (tomorrow)", \
2000 >= x, " (in " + (x - 1000) + " days)", \
x >= 2000, " ", \
" ")
# This calsuffix is used by wxRemind
FSET calsuffix(x) iif(0 > x, " ", \
998 >= x, " (" + (1000-x) + " days ago)", \
999 >= x, " (yesterday)", \
1000 >= x, " (today)", \
1001 >= x, " (tomorrow)", \
2000 >= x, " (in " + (x - 1000) + " days)", \
x >= 2000, " ", \
" ")
ENDIF
------------------- end cut ------------------------------------
-Dan
--
Daniel A. Graham
Department of Economics
Duke University
Durham, NC 27708-0097
(919) 660-1802
More information about the Remind-fans
mailing list