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

Public holidays Belgium #115

Closed
sanderd17 opened this issue Oct 16, 2015 · 8 comments
Closed

Public holidays Belgium #115

sanderd17 opened this issue Oct 16, 2015 · 8 comments
Labels
type: feature Introduction of new functionality.

Comments

@sanderd17
Copy link

In Belgium there are 10 public holidays. They are the same for all regions. However, as the regions use different languages, they are named differently.

See https://nl.wikipedia.org/wiki/Feestdagen_in_Belgi%C3%AB , https://fr.wikipedia.org/wiki/F%C3%AAtes_et_jours_f%C3%A9ri%C3%A9s_en_Belgique and https://de.wikipedia.org/wiki/Feiertage_in_Belgien

I'm not sure how to put these different languages in JS data., so I'll just give a French, Dutch and German example

        'be': { // {{{
            'PH': { // https://fr.wikipedia.org/wiki/F%C3%AAtes_et_jours_f%C3%A9ri%C3%A9s_en_Belgique
                "Jour de l'an"                          : [  1,  1 ],
                "Lundi de Pâques"                  : [  'easter', 1 ],
                "Fête du Travail"                     : [  5,  1 ],
                "Jeudi de l'Ascension"            : [  'easter', 39 ],
                "Lundi de Pentecôte"              : [  'easter', 50 ],
                "Fête nationale"                      : [  7, 21],
                "Assomption"                          : [  8, 15 ],
                "Toussaint"                             : [ 11,  1 ],
                "Armistice"                              : [ 11, 11 ],
                "Noël"                                     : [ 12, 25 ],
            }
        }, // }}}
        'be': { // {{{
            'PH': { // https://nl.wikipedia.org/wiki/Feestdagen_in_Belgi%C3%AB
                "Nieuwjaar"                                  : [  1,  1 ],
                "Paasmaandag"                           : [  'easter', 1 ],
                "Dag van de arbeid"                     : [  5,  1 ],
                "Onze-Lieve-Heer-Hemelvaart"    : [  'easter', 39 ],  // Often shorted to O.L.H. Hemelvaart
                "Pinkstermaandag"                      : [  'easter', 50 ],
                "Nationale feestdag"                    : [  7, 21],
                "Onze-Lieve-Vrouw-Hemelvaart"  : [  8, 15 ], // Often shorted to O.L.V. Hemelvaart
                "Allerheiligen"                               : [ 11,  1 ],
                "Wapenstilstand"                          : [ 11, 11 ],
                "Kerstmis"                                     : [ 12, 25 ],
            }
        }, // }}}
        'be': { // {{{
            'PH': { // https://nl.wikipedia.org/wiki/Feestdagen_in_Belgi%C3%AB
                "Neujahr"                                     : [  1,  1 ],
                "Ostermontag"                             : [  'easter', 1 ],
                "Tag der Arbeit"                           : [  5,  1 ],
                "Christi Himmelfahrt"                    : [  'easter', 39 ],
                "Pfingstmontag"                           : [  'easter', 50 ],
                "Nationalfeirtag"                           : [  7, 21],
                "Mariä Himmelfahrt"                     : [  8, 15 ],
                "Allerheiligen"                               : [ 11,  1 ],
                "Waffenstillstand"                         : [ 11, 11 ],
                "Weihnachten"                             : [ 12, 25 ],
            }
        }, // }}}

I don't know exactly what to do with Easter and Pentecost. As they always fall on a sunday, the monday after it is considered the PH. Our legislation doesn't differentiate between PHs and sundays AFAIK. so I guess it's fine to exclude these two days.

Then we also have extra holidays for public servants, and oddly enough, that also counts for banks. These do differ between different regions, as the regional holiday is normally included in it.

@ypid
Copy link
Member

ypid commented Oct 16, 2015

I don't know exactly what to do with Easter and Pentecost.

They seem to be defined as PH according to https://de.wikipedia.org/wiki/Feiertage_in_Belgien so they should be added here.

Then we also have extra holidays for public servants, and oddly enough, that also counts for banks.

I think excluding them for now when they are not "official" PHs is the best option. There is an proposal to be written to handle that kind of stuff. There are other countries which have BH (also discussed on the mailing list). I live in Germany and there is no such thing so someone else is encouraged to get that specified.

In Belgium there are 10 public holidays.

All right. I use the different states of countries to differentiate this. I hope this works here as well. Can you maybe write this definition using the following query which can give you the state for each region (you will need to set lat and lon respectively)? See also https://github.com/ypid/opening_hours.js#holidays-1

https://nominatim.openstreetmap.org/reverse?format=json&lat=51.0308&lon=3.7666&zoom=18&addressdetails=1

@ypid ypid added the type: feature Introduction of new functionality. label Oct 16, 2015
@sanderd17
Copy link
Author

The German page is the only one to list Easter and Pentecost as PH, while the German language only represents 1% of the population, so I'm more eager to follow the French and Dutch pages.

Banking holidays would be ideal for those extra days. So it shouldn't be included in the PH section indeed.

For the linguistic communities, you can find those boundaries here: http://wiki.openstreetmap.org/wiki/WikiProject_Belgium/Boundaries#Linguistic_Communities_.28Gemeenschappen_.2F_Communaut.C3.A9s_.2F_Gemeinschaften.29

However, the tagging mentioned on the wiki isn't right. It's not an administrative border, but a political one on OSM. This is because the linguistic communities don't blend in well with our other administrative boundaries (like provinces and arrondissements). So nominatim doesn't include the communities is their reverse lookup.

On top of that, Brussels is a bilingual city, and falls under the Flemish and French community. So perhaps Brussels could be a 4th, hard-coded bilingual list.

If you must rely on results from nominatim, the monolingual Dutch speaking area matches perfectly with the Flemish region (state Vlaanderen on nominatim), and the bilingual French-Dutch area matches perfectly with the Brussels Capital region (also listed as a state on nominatim). The German community on the other hand, can only be defined as a list of 9 municipalities. And the French community is the Walloon region (again a state on nominatim), but with the exclusion of those 9 German municipalities.

I hope this brought some clarity, but quite likely it didn't.

@ypid
Copy link
Member

ypid commented Oct 17, 2015

I hope this brought some clarity

You did 👍 Thanks very much for the details.

So nominatim doesn't include the communities is their reverse lookup.

That is a problem as I am currently only relaying on reverse geocoding from nominatim for the PH/SH decision.

The German community on the other hand, can only be defined as a list of 9 municipalities.

Copy, paste with a hint/comment that the definitions are the same is the best option for now. If there is to much redundancy in the data I will need to clean that up afterwards.

so I'm more eager to follow the French and Dutch pages.

I don’t know the local details so my opinion was only a suggestion and you can decide the details.

@sanderd17 Would you like/be able to implement this JS object which can be included in the library? Extra points for writing tests for the definitions 😉

@sanderd17
Copy link
Author

I would like to do it, but I still wonder what to do with the monolingual French area. How can 9 municipalities be excluded from the Walloon Region?

If no municipalities can be excluded, then the remaining list would look quite big and consist of:

  • 4 provinces in Wallonia (excluding the province of Liège, where the German community is in)
  • 3 arrondissements in the province of Liège (excluding the arrondissement of Verviers)
  • 20 municipalities in the arrondissement of Verviers (excluding the 9 that are German speaking)

Repeating the same list 27 times, that really looks too much for me, and a nicer solution should be found.

Perhaps, instead of nominatim, you could consider using Overpass. A query like this returns all areas the coordinate is in: http://overpass-turbo.eu/s/c5j

If that all looks too hard. Maybe one single list in English is the better option.

@ypid
Copy link
Member

ypid commented Oct 17, 2015

I see. Running an overpass query each time oh values are evaluated is not an option right now (like it is done with nominatim) but including the overpass response to a query statically in to the lib would be an option if you really want to do it, I will not stand in the way.

About the redundancy. You are total right. You can do this like I demonstrated in this POC: ypid@947dab1

If that all looks too hard. Maybe one single list in English is the better option.

That would also be an option 😉. If you want to go the difficult/better or the easier/sufficient path is up to you.

@ypid
Copy link
Member

ypid commented Nov 20, 2015

@marcgemis also implemented PH for Belgium: marcgemis#1 (I was just made aware of it).

@sanderd17 What do you think, which path should we go?

@sanderd17
Copy link
Author

Oh, totally forgot about this pending job. The patch from Marc is fine. The dates are the same, and he uses bilingual labels, which is fine for me too (if you don't consider the strings to be too long).

But most importantly, he has a patch, I don't ;)

@ypid
Copy link
Member

ypid commented Nov 20, 2015

@sanderd17 Thanks very much for your thoughtful comments. I will merge @marcgemis version then and give you both credits.

@ypid ypid closed this as completed in 22bb6c5 Nov 22, 2015
ypid added a commit that referenced this issue Nov 22, 2015
ypid added a commit that referenced this issue Nov 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Introduction of new functionality.
Projects
None yet
Development

No branches or pull requests

2 participants