[Remind-Fans] U.S. Federal Holidays / macros

Dianne Skoll dianne at skoll.ca
Tue Mar 7 18:24:05 EST 2023


On Tue, 7 Mar 2023 22:26:45 +0000 (UTC)
Paul Floyd via Remind-fans <remind-fans at lists.skoll.ca> wrote:

> I didn't know this until recently, but apparently the U.S. government
> rule for observing Independence Day applies not just to Independence
> Day, but to all Federal holidays that fall on a specific day of the
> month.

Interesting...

> So maybe defs.rem and/or holidays/us.rem should be updated to reflect
> this?

Yup!

> In any case, that's the context for part 2. Rather than copy and
> paste an (almost) identical set of rules over and over, I created a
> file us_fed_hol.rem with this in it:

[...]

> SET holdate "Jan 1"
> SET holname "New Year's Day"
> DO [us_fed_hol]

> SET holdate "Jun 19"
> SET holname "Juneteenth"
> DO [us_fed_hol]

> So it's kind of a poor-man's macro.

Yes; this is a reasonably-common technique.  Remind has no built-in
macro or template facility and is unlikely to get it any time soon
as it would require major changes to the parser.

I will probably update us.rem and just type everything in longhand; it has
to be done once and then everyone can simply reuse us.rem.  Not the best
solution, but adequate.

Regards,

Dianne.


More information about the Remind-fans mailing list