-
Notifications
You must be signed in to change notification settings - Fork 13
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
Support location in addition to ISO 3166-2 codes as region #57
Comments
You are not alone: There is a similar problem in Germany, where the city of Augsburg has its own holiday. Another holiday in Saxonia is only held in communities with mostly catholic population, which may change according to the current census data. Also there are some regions in Australia, where holidays are only held in parts of that region. The advantage of ISO codes is that they are a standard, i.e. they are the same regardless of language. Adding city names to the region definition also adds (apart from the mentioned UTF-8 and spaces) the problem of internationalization: how do you refer to these in a different locale for the same country? (Unfortunately ZIP codes seem not to be impractical as they often do not coincide with commuity borders.) You also have to consider the consumer side: For example the refresh scripts of taskwarrior and timewarrior lets you choose the region for your holiday data and filters the holidata accordingly. How shall the additional location be implemented here? How can one retrieve all holidays from region X except/including location Y from holidata? So far I chose to merge those holidays into the larger region or to ignore them for simplicity sake and least impact on the consumer side. That said, this is not a "no" to your proposal, but we need a solution that is feasible for all locales in holidata. A first compromise for #56 would be to include those holidays with an additional note "sólo para la ciudad de Granada". 🤔 |
You are right. Is more complex than I though. For #56 I am going to include some national corrections and try to include more regions (comunidades autónomas) than just Andalusia. Keeping out local holidays for now. Just that is going to be more work than expected. |
In Spain we have national and regional holidays that can be covered by ISO 3166-2:ES codes but also 2 days of local holidays. And by local I mean holidays different by location not province. i.e. a Granada, Málaga or Seville holiday is not for the whole province but just for the city.
I think we must use ISO 3166 codes for regions that are covered but for smaller divisions accept the complete localized name of the location. Holidays by regions smaller and/or not in ISO 3266 codes could be the case in other countries. At least it is for Spain.
But I don't know if the region parameter can handle safely UTF-8 and spaces present in some location's name.
The text was updated successfully, but these errors were encountered: