Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meaning of the type flags #63

Closed
mheden opened this issue Oct 12, 2020 · 2 comments
Closed

Meaning of the type flags #63

mheden opened this issue Oct 12, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@mheden
Copy link

mheden commented Oct 12, 2020

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 mheden added the bug Something isn't working label Oct 12, 2020
@mheden
Copy link
Author

mheden commented Oct 12, 2020

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
Copy link
Member

lauft commented Oct 12, 2020

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:

  • If a holiday has regions defined, it must not have flag N and it must have flag N if there are no regions defined
  • A holiday must either have type F or V, not none, not both

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.

@mheden mheden closed this as completed Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants