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

Support location in addition to ISO 3166-2 codes as region #57

Open
vice opened this issue Jun 20, 2020 · 2 comments
Open

Support location in addition to ISO 3166-2 codes as region #57

vice opened this issue Jun 20, 2020 · 2 comments

Comments

@vice
Copy link
Contributor

vice commented Jun 20, 2020

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.

region meaning
AN for Andalusia autonomous community ISO 3166-2:ES
GR for Granada province ISO 3166-2:ES
MA for Málaga province ISO 3166-2:ES
SE for Seville province ISO 3166-2:ES
Granada for Granada city (proposed)
Málaga for Málaga city (proposed)
Sevilla for Seville city (proposed)

But I don't know if the region parameter can handle safely UTF-8 and spaces present in some location's name.

@vice vice changed the title Support location in region field. More flexibility than just ISO 3166 codes Support location in region field, more flexibility than just ISO 3166 codes Jun 20, 2020
@vice vice changed the title Support location in region field, more flexibility than just ISO 3166 codes Support location in region field in addition to ISO 3166 codes Jun 20, 2020
@vice vice changed the title Support location in region field in addition to ISO 3166 codes Support location in region field in addition to ISO 3166-2 codes Jun 20, 2020
@vice vice changed the title Support location in region field in addition to ISO 3166-2 codes Support location in addition to ISO 3166-2 codes as region Jun 20, 2020
@lauft
Copy link
Member

lauft commented Jun 20, 2020

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". 🤔

@vice
Copy link
Contributor Author

vice commented Jun 20, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants