[Remind-Fans] U.S. Federal Holidays / macros
Paul Floyd
quellism-oxide at yahoo.com
Tue Mar 7 17:52:28 EST 2023
Sorry, the us_fed_hol.rem file probably doesn't make sense because I omitted the first couple of lines. It looks more like this:
############# us_fed_hol.rem ##############REM [holdate] SCANFROM -7 SATISFY 1
SET trig TRIGDATE()
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]%"
###########################################
- Cedric
On Tuesday, March 7, 2023 at 03:29:58 PM MST, Paul Floyd via Remind-fans <remind-fans at lists.skoll.ca> wrote:
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
_______________________________________________
Remind-fans mailing list
Remind-fans at lists.skoll.ca
https://dianne.skoll.ca/mailman/listinfo/remind-fans
Remind is at https://dianne.skoll.ca/projects/remind/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dianne.skoll.ca/pipermail/remind-fans/attachments/20230307/c711a98c/attachment-0001.htm>
More information about the Remind-fans
mailing list