Hi Dianne, 9 oct. 2022, 22:21 de [email protected]:
>> 1) Ignore %b substitution if value is "today"? >> > Yes. Remind allows you to override substitutions. > I see you have already thought of everything!! > So: > > FSET subst_b(a, d, t) iif(d==today(), "", d==today()+1, "tomorrow", "in " + > (d-today()) + " days' time") > Perfect, indeed :) >> 2) Substitute %1 only within timed reminders context (no delta) >> >> Indeed, I have various timed reminders with delta and I only want to >> display their %1 value if they are for today. No 2 days ahead and so >> on... >> > Similarly, define a "subst_1" function that does what you need. > Great. Here is my function if someone wants it: FSET subst_1(a, d, t) iif(d!=today(), subst_b(a, d, t), \ t == now(), "maintenant", \ t > now(), "dans " + subst_tdiff((t-now())/60, (t-now())%60), \ "il y a " + subst_tdiff ((now()-t)/60, (now()-t)%60)) > See the > section RUN-TIME MODIFICATION OF THE SUBSTITUTION FILTER in the Remind > man page. > By the way, I read: "subst_N(alt, date, time): This is actually a family of functions, where N is a letter or number. This function completely overrides the substitution sequence "%X". The three arguments are an integer alt which, if non-zero, indicates that the alternate-mode substitution sequence "%*X" was encountered; date which is the trigger date of the reminder and time which is the trigger time." Instead of writing "%X" or "%*X" , maybe it would be more logical to write "%N" or "%*N" since the function is about generically called "subst_N", no? :) Thank you & Best regards, l0f4r0 _______________________________________________ Remind-fans mailing list [email protected] https://dianne.skoll.ca/mailman/listinfo/remind-fans Remind is at https://dianne.skoll.ca/projects/remind/
