[Remind-Fans] How to get reminders every 2 years?

Tim Chase remind at tim.thechases.com
Sat Sep 22 09:24:24 EDT 2018


On 2018-09-22 15:00, Claudio Pighin wrote:
> I've been using Remind for a few days and I could not find an easy
> way to get a reminder every 2 years, for example on the 1st of
> January of just the even years (2018, 2020, etc., skipping the odd
> years). Which specific instruction should I use?

You want the SATISFY clause:

REM Jan 1 SATISFY [$Ty % 2 == 0] MSG %"Happens on even years%"%
REM Jan 1 SATISFY [$Ty % 2 == 1] MSG %"Happens on odd years%"%

That latter one can be simplified to

REM Jan 1 SATISFY [$Ty % 2] MSG %"Happens on odd years%"%

You can adjust the 2 for however many years you want to skip, so

REM Nov 1 SATISFY [$Ty % 4 == 0] MSG %"Every 4 years%"%

You can see this in one of the demo files

https://www.roaringpenguin.com/wiki/index.php/Defs.rem

where they do this for election day:

   REM Tue Nov 2 SCANFROM [_back(7)] \
      SATISFY [(YEAR(TRIGDATE()) % 4) == 0] \
      MSG %"Election%" Day

("$Ty" is the same as "YEAR(TRIGDATE())")

Hope this helps!

-tim





More information about the Remind-fans mailing list