[Remind-Fans] OMIT and THROUGH for every year

Dianne Skoll dianne at skoll.ca
Thu Jul 28 08:53:55 EDT 2022


On Thu, 28 Jul 2022 02:32:31 -0400
"Ian! D. Allen via Remind-fans" <remind-fans at lists.skoll.ca> wrote:

> Yay!  Thanks for considering this.

I have an implementation on a branch if anyone wants to test...

https://salsa.debian.org/dskoll/remind/-/tree/more-flexible-omit

[...]

>    OMIT Sep 1 [$Uy] THROUGH Dec 31 [$Uy]
>    OMIT Jan 1 [$Uy] THROUGH May 31 [$Uy]

> The above are much simpler than using an OMIT for every individual
> day, and they become part of the global OMIT list and don't need an
> OMITFUNC. You didn't accept these as solutions, so I wonder where
> they break?

They work in 99% of cases.  Where they break is this, using the new
Remind from the branch:

       # Specify the year
       OMIT Jan 1 [$Uy] THROUGH Jan 31 [$Uy]
       REM 1 Feb -1 MSG Trigger #1

       CLEAR-OMIT-CONTEXT
       # Don't specify the year
       OMIT Jan 1 THROUGH Jan 31
       REM 1 Feb -1 MSG Trigger #2

If we run this file with:  remind -dt example.rem 1 Dec 2022 we get different
results for the two triggers:

        $ ./remind -dt /tmp/example.rem 1 Dec 2022
        /tmp/example.rem(3): Trig = Tuesday, 31 January, 2023
        /tmp/example.rem(8): Trig = Saturday, 31 December, 2022

Admittedly, this example is a little contrived.

Regards,

Dianne.


More information about the Remind-fans mailing list