[Remind-Fans] Mother's day in France

Alain Guibert alguibert+rf at free.fr
Mon Jun 25 17:52:08 EDT 2007


Hello Gerhard,

 On Sunday, June 24, 2007 at 22:52:10 +0200, Gerhard Kirchmann wrote:

> With the --7 you can solve the problem within two lines:
>
> OMIT [trigger(easterdate(year(today()))+49)] MSG pentecôte
> REM SUN 1 Jun --7 OMIT MON TUE WED THU FRI SAT AFTER MSG Fête des Mères

Nice one! Thank you Gerhard: this is shorter and runs faster than the
IFTRIG method.

However there is a problem: if the user has an unrelated OMIT that
happens to fall on the last Sunday of May, it will also retard Mother's
day a week later, as if it was Pentecost... Solution: clear the global
OMIT context for these 2 lines only. The OMIT nature of Pentecost is
probably not needed outside of this trick, Pentecost being a Sunday
anyway. So this seems to work well:

OMIT 25 May 2003			MSG test omit colliding Mother's day

PUSH-OMIT-CONTEXT
CLEAR-OMIT-CONTEXT
   OMIT [trigger(easterdate(year(today()))+49)]			MSG Pentecôte
   REM Sun [_last(May)] OMIT Mon Tue Wed Thu Fri Sat AFTER	MSG Fête des Mères
POP-OMIT-CONTEXT

However this no longer runs faster than IFTRIG, but roughly the same.
Anyway I adopt this method, thanks again Gerhard!


Alain.



More information about the Remind-fans mailing list