[Remind-Fans] Event on last Friday in month and on the consecutive day

Max maximilian.mustermann at gmail.com
Wed May 26 11:41:40 EDT 2010


Well, it turns out that the second event does indeed show when using
the simple list format (remind -n) but not in the calendar format
(remind -c) or in unformatted output (remind -s). The trigger date
computation seems correct:

   $ remind -dtx .reminders.test 1 August 2012
   .reminders.test(1): Trig = Friday, 31 August, 2012
   trigdate() => 2012-08-31
   2012-08-31 - 0 => 2012-08-31
   trigger(2012-08-31) => "31 August 2012"
   .reminders.test(2): Trig = Friday, 31 August, 2012
   trigdate() => 2012-08-31
   2012-08-31 + 1 => 2012-09-01
   trigger(2012-09-01) => "1 September 2012"
   .reminders.test(3): Trig = Saturday, 1 September, 2012

Is this a bug? I unfortunately I rely on remind -s to export my
calendar to iCal; I would appreciate to see how others deal with
"trigdate +/- n days before/after" events in a more elegant manner.

Thanks, Max

On Wed, May 26, 2010 at 12:33 PM, Max <maximilian.mustermann at gmail.com> wrote:
> Hi,
>
> Two local events, one taking place on the last Saturday in April and
> the day before (Friday) and the other one one the last Friday in
> August and the day after (Saturday). Consequently, for the first
> event, Friday and Saturday always fall into the same month and my
> current remind rule is as follows:
>
>   REM Sat 1 May --7 SATISFY 1
>   REM [trigger(trigdate() - 0 )] MSG Event 1%
>   REM [trigger(trigdate() - 1 )] MSG Event 1%
>
> However, Friday and Saturday of the second event could fall into
> consecutive months. I tried the following rule but it fails to trigger
> on Saturday, even if it falls within the same month:
>
>   REM Fri 1 Sep --7 SATISFY 1
>   REM [trigger(trigdate() - 0 )] MSG Event 2%
>   REM [trigger(trigdate() + 1 )] MSG Event 2%
>
> How could a rule for the second event look like? Does anyone have a
> more generic or more elegant solution to the problem "trigdate +/- n
> days before/after"?
>
> Any clues?
>
> Thanks.
>



More information about the Remind-fans mailing list