[Remind-Fans] Reminder Popups with date and time

David F. Skoll dfs at roaringpenguin.com
Mon Jun 6 09:23:50 EDT 2011


On Mon, 6 Jun 2011 10:35:01 +1200
Mark Lawrence <nomad at null.net> wrote:

> I don't know if there is a way to generate that information from
> remind itself,

Here's my attempt at a pure Remind version.  Very lightly tested; may not
work!

Regards,

David.

# Helper functions
FSET _days(x) iif(x>1, x + " days", x==1, "1 day", "")
FSET _hrs(x)  iif(x>1, x + " hours", x==1, "1 hour", "")
FSET _mins(x) iif(x>1, x + " minutes", x==1, "1 minute", "")
FSET _smush(x, y) iif(x != "" && y != "", x + " and " + y, x + y)

# Main function
FSET _countdown(x) _smush(_smush(_days(x/1440), _hrs((x - 1440*(x/1440))/60)), _mins(x%60))

# Example of how to use _countdown:
REM 9 June +100 AT 16:34 MSG Something [_countdown(trigdatetime()-current())]


More information about the Remind-fans mailing list