[Remind-Fans] USHOLS Tax Day Example

Dianne Skoll dianne at skollsoft.com
Sat Jan 14 12:59:19 EST 2023


On Sat, 14 Jan 2023 17:24:27 +0000
Tim Chase via Remind-fans <remind-fans at lists.skoll.ca> wrote:

> there are additional tweaks for officially-recognized state holidays:

> - Emancipation Day (Apr 16) in Washington, DC
> - Patriots' Day (3rd Monday of April) in MA and ME

>     OMIT Apr 16 MSG Emancipation Day
>     # if it falls on a Sat, move it to Fri
>     # if it falls on on a Sun, move it to Sun
>     SET emancdayobs iif($Tw == 6, $T - 1, iif($Tw == 0, $T + 1, $T))
>     IF $T != emancdayobs
>       OMIT [emancdayobs] MSG Emancipation Day (observed)
>     ENDIF

Doing this sort of date arithmetic subverts the Remind algorithm and
might give incorrect results.  I would use:

      # Normal case: 16 April falls Mon-Fri
      REM 16 Apr SCANFROM -7 ADDOMIT SATISFY [$Tw >= 1 && $Tw <= 5] MSG Emancipation Day

      # 16 April falls on Saturday: Observe on the 15th
      REM 15 Apr SCANFROM -7 ADDOMIT SATISFY [$Tw == 5] MSG Emancipation Day (observed)

      # 16 April falls on Sunday: Observe on the 17th
      REM 17 Apr SCANFROM -7 ADDOMIT SATISFY [$Tw == 1] MSG Emancipation Day (observed)

>     IF defined("LIVEINMA") || defined("LIVEINME")
>       REM Mon Apr 14 SATISFY 1
>       SET patriotsday $T
>       OMIT [patriotsday] MSG Patriots Day
>     ENDIF

The third Monday in a month is on or after the 15th, not the 14th.  And Remind
has syntactic sugar, so I would rewrite as:

      IF defined("LIVEINMA") || defined("LIVEINME")
          REM Third Monday in April SCANFROM -7 ADDOMIT MSG Patriots Day
      ENDIF

>     REM Apr 15 OMIT Sat Sun AFTER MSG Tax Day

And then the above should work.  (My examples assume a recent version
of Remind, >= 04.02.00.)

Regards,

Dianne.


More information about the Remind-fans mailing list