Re: [Remind-Fans] Opinions sought

2024-11-04 Thread Dianne Skoll via Remind-fans
On Mon, 4 Nov 2024 19:32:11 +0100
Kurt Keller via Remind-fans  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.
___
Remind-fans mailing list
Remind-fans@lists.skoll.ca
https://dianne.skoll.ca/mailman/listinfo/remind-fans
Remind is at https://dianne.skoll.ca/projects/remind/


Re: [Remind-Fans] Opinions sought

2024-11-04 Thread Tim Chase via Remind-fans
On 2024-11-04 19:32, Remind list wrote:
> I would suggest option 1.5. :-)
>
> The regional files should include all the public holidays for that
> region, thus also include the national holidays.
>
> The country file should include the national holidays only. Basically
> I see the country file as a synthetic region meaning this is a holiday
> in all regions.

The trouble with this, as highlighted by someone (sorry, the message has
already gone to the big bit-bucket in the sky, but please incorporate
credit by oblique reference) is that if you need to include mulitple
regions, you end up including/displaying the national holidays twice.

So having one file for national holidays, one for each region with its
regional holidays seems to be the most useful way to go.

-tkc





___
Remind-fans mailing list
Remind-fans@lists.skoll.ca
https://dianne.skoll.ca/mailman/listinfo/remind-fans
Remind is at https://dianne.skoll.ca/projects/remind/


Re: [Remind-Fans] Opinions sought

2024-11-04 Thread Kurt Keller via Remind-fans
(repost without code sample, the first attempt caused mail server
 dianne.skoll.ca to be unhappy...)

I would suggest option 1.5. :-)

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

The country file should include the national holidays only. Basically I
see the country file as a synthetic region meaning this is a holiday in
all regions.

I'm not using remind for work. But at work, for some things, we
need to distinguish whether a holiday is a public holiday in
ALL of Switzerland's cantons or not.

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.

On Sun, Nov 03, 2024 at 09:01:16AM -0500, Dianne Skoll via Remind-fans wrote:
> Hi,
> > 
> > Seeking opinions about how to structure the holiday files I ship with
> > Remind.  Which of the following do you prefer?
> > ...
___
Remind-fans mailing list
Remind-fans@lists.skoll.ca
https://dianne.skoll.ca/mailman/listinfo/remind-fans
Remind is at https://dianne.skoll.ca/projects/remind/


Re: [Remind-Fans] Opinions sought

2024-11-03 Thread Dianne Skoll via Remind-fans
On Sun, 3 Nov 2024 10:38:40 -0500
Michael DeBusk via Remind-fans  wrote:

> I live in Maryland, but very close to the Delaware line, and I have
> lots of family in Virginia. I may want to be reminded of holidays or
> observances in three states. Unless I'm mistaken, the "automatically
> pull" configuration would pull the national holidays in three times,
> would it not?

Yes, it would, so this argues for no automatic pull.

Regards,

Dianne.
___
Remind-fans mailing list
Remind-fans@lists.skoll.ca
https://dianne.skoll.ca/mailman/listinfo/remind-fans
Remind is at https://dianne.skoll.ca/projects/remind/


Re: [Remind-Fans] Opinions sought

2024-11-03 Thread Michael DeBusk via Remind-fans
On Sun, Nov 3, 2024 at 9:02 AM Dianne Skoll via Remind-fans
 wrote:

> In other words, should the regional files only include the holidays
> for the specific region?  Or should they automatically pull in the
> country-wide holidays too?

I live in Maryland, but very close to the Delaware line, and I have
lots of family in Virginia. I may want to be reminded of holidays or
observances in three states. Unless I'm mistaken, the "automatically
pull" configuration would pull the national holidays in three times,
would it not?

And now you've got me thinking I should split my holiday.rem file up.
When I started, I used the one you shipped, and added new ones as the
whim caught me. I've got national holidays like Easter and Christmas
in with state holidays like Maryland Day and Preakness and oddball
observances like National Nothing Day (January 16) and National Short
Girl Appreciation Day (December 21) and even an Armenian holiday
(Armenian Genocide Remembrance Day, April 24, because a friend's
mother is from Armenia and it matters to her). My holiday.rem file is
kind of a mess, even with it divided into sections and with vim's fold
markers.

I needed a new project. :D

-- 
()  ascii ribbon campaign * against html e-mail
/\  www.asciiribbon.org   * against proprietary attachments
Home: http://nlphilia.com * Blog: http://nlphilia.net

___
Remind-fans mailing list
Remind-fans@lists.skoll.ca
https://dianne.skoll.ca/mailman/listinfo/remind-fans
Remind is at https://dianne.skoll.ca/projects/remind/