[Remind-Fans] Opinions sought

Dianne Skoll dianne at skoll.ca
Mon Nov 4 15:26:38 EST 2024


On Mon, 4 Nov 2024 19:32:11 +0100
Kurt Keller via Remind-fans <remind-fans at lists.skoll.ca> wrote:

> The regional files should include all the public holidays for that
> region, thus also include the national holidays.

I've decided not to do it this way, because it's less flexible.  If you
want all of the holidays, including national holidays, for a region,
you can use:

    INCLUDE [$SysInclude]/holidays/CC.rem
    INCLUDE [$SysInclude]/holidays/CC/REG.rem

But if for some reason you *only* want the regional holidays for a region,
you can't do it if CC/REG.rem also pulls in CC.rem.

> You probably are aware of the python holidays library "holidays"
> https://pypi.org/project/holidays which does a pretty good job with
> definitions of pubic holidays.  Might serve as a good starting point
> for populating your holidays directory.

Yes, I am aware of that.  Unfortunately, I don't know Python very well
and that library's API is designed to answer the question:  "Is this date
a holiday?" rather than "Get me all the holidays for region XYZ..."

It might be possible to hack that project so it outputs relevant REM or
OMIT commands rather than building up an internal data structure,
but I'd have to learn Python to do that. :)

Regards,

Dianne.


More information about the Remind-fans mailing list