[Remind-Fans] Reminder Popups with date and time

Jostein Berntsen jbernts at broadpark.no
Mon Jun 6 13:31:36 EDT 2011


On 06.06.11,09:23, David F. Skoll wrote:
> 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())]

This is quite cool, tested and it works great!


Jostein





More information about the Remind-fans mailing list