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

Paul Floyd quellism-oxide at yahoo.com
Tue Mar 7 17:26:45 EST 2023


This is kind of a two-parter

Part 1:

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.  In other words:

New Year's Day (January 1)
Juneteenth (June 19)
Independence Day (July 4)
Veterans Day (November 11)
Christmas Day (December 25)

source: https://www.opm.gov/policy-data-oversight/pay-leave/pay-administration/fact-sheets/holidays-work-schedules-and-pay

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

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:


############# us_fed_hol.rem ##############
REM [trig-1] SCANFROM -7 ADDOMIT SATISFY [$Tw == 5]  MSG %"[holname] (observed)%"
REM [trig+1] SCANFROM -7 ADDOMIT SATISFY [$Tw == 1]  MSG %"[holname] (observed)%"
REM [trig] SCANFROM -7 ADDOMIT SATISFY [$Tw == 0 || $Tw == 6] MSG %"[holname] (actual)%"
REM [trig] SCANFROM -7 ADDOMIT SATISFY [$Tw >= 1 && $Tw <= 5] MSG %"[holname]%"
###########################################

Then in my main reminder file, I have:

#########
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]

... and so on for the other three holidays.

#######

So it's kind of a poor-man's macro.  Ideally, I would have preferred to define a real "macro" or "template" of statements within the main reminder file, and then "call" the macro/template once for each holiday, but I didn't see any way to do that.  So I guess my question is, does such a capability exist or is there some other (better) way to do this?
Thx,
- Cedric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dianne.skoll.ca/pipermail/remind-fans/attachments/20230307/99d2486f/attachment.htm>


More information about the Remind-fans mailing list