GothenburgBitFactory / holidata

Holidata is the core of holidata.net, a no-nonsense, ad-free provider of international holiday data.
https://holidata.net
MIT License
43 stars 11 forks source link

Meaning of the type flags #63

Closed mheden closed 3 years ago

mheden commented 3 years ago

What does the different letters of the type indicate? I can't seem to find any information regarding this on holidata.net nor in the repository.

mheden commented 3 years ago

Ah, I found something in the test_holidays.py file. Is the following correct?

N - national R - regional V - variable F - Fixed

However, if I look at sv-SE it seem like the R is more related to religious than regional.

lauft commented 3 years ago

The intended meaning is N - national (missing means, that this holiday is defined for specific regions only) R - religious (holiday with religious background) V - variable (depending on easter date, or something like "1st weekday in month") F - fixed (can be defined as MM-DD)

Currently there are only two rules concerning flags defined in tests/test_holidays.py:

There is no hard rule for flag R, currently all holidays which originate from religious feast (Easter, Christmas, St.-X-Day,...) carry it (as opposed to e.g. "Labour Day"). It may be redefined for holidays that only apply to a certain religious group, but this is not yet decided.

Side note: Timewarrior (and probably Taskwarrior) do not really use the flags, but use the region attribute to filter the holidays that matter for them in the respective refresh script. So there is no hard use case for the flags I currently know of. It is more of a (rough) categorization for further purposes.