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 Public Holidays in opening times #3883

Open
biodranik opened this issue Nov 14, 2022 · 10 comments
Open

Support Public Holidays in opening times #3883

biodranik opened this issue Nov 14, 2022 · 10 comments
Labels
Map Data OpenStreetMap data related issues Opening Hours Business Hours, off time, holidays, seasonal Regional This issue is different depending on the country or region

Comments

@biodranik
Copy link
Member

OM needs:

  1. Make sure that PH are properly parsed/supported from OSM (3party/opening_hours)
  2. Have manually or automatically updated list of PH (one of the sources can be https://github.com/opening-hours/opening_hours.js/tree/master/src/holidays)
  3. Add holidays into data/countries_meta.txt where parsing is already supported, or even better, add holidays into map regions directly in data/countries.txt (and ideally move countries_meta.txt data there).
  4. Properly use PH in the code that detects if place is open or closed.
@biodranik biodranik added Map Data OpenStreetMap data related issues Regional This issue is different depending on the country or region Opening Hours Business Hours, off time, holidays, seasonal labels Nov 14, 2022
@Misalf-git
Copy link

Also, while at it, handling SH (school holidays) in some way might be good. Seems to be pretty much the same thing.

Currently, the presence of SH in the opening_hours tag breaks the formatting for displaying it in the place page, resulting in the raw (rather cryptic) value being shown.

If SH is too uncommon or if its locally differentiating and frequently changing data is not easy to come by, it could still (nicely formatted) be displayed in the place page without evaluation of the current date, in addition to the usual opening hours.

@biodranik
Copy link
Member Author

It may be beneficial to implement a workaround at the first stage: to display OSM values as is, without breaking the UX.

@matkoniecz
Copy link
Contributor

It may be beneficial to implement a workaround at the first stage: to display OSM values as is, without breaking the UX.

based on image in #7372 (comment) - this seem to be done now

@patepelo
Copy link
Contributor

How do you think about first putting Public Holiday as "another day in the week". If the source information contains PH, it translate it to Public Holiday in each language and puts it at the end.

This would be a first step without too complexity.

Also, if later the dates were to be added, some countries like Germany are mapped with that information on its relation. See: https://www.openstreetmap.org/relation/2188155

@patepelo
Copy link
Contributor

Also, the presence of the value "Off" like "Su: off" is very common and should be handled as well.

Then there are more complex cases where the schedules change depending on dates or months. Or even closing time may be "dusk" or such values.

@matkoniecz
Copy link
Contributor

Also, the presence of the value "Off" like "Su: off" is very common and should be handled as well.

Is there a ticket for it?

@patepelo
Copy link
Contributor

Also, the presence of the value "Off" like "Su: off" is very common and should be handled as well.

Is there a ticket for it?

#1575

@biodranik
Copy link
Member Author

I assume that the OH parser code should be rewritten to support these values. As most places follow PH schedule, it may be beneficial to store exceptions instead. Not sure if it's possible.

Using OSM relations as a source of truth doesn't look like a good idea. It should be enough to compile a data file with PHs for each country once a year from public sources. Does anyone do that already?

@matkoniecz
Copy link
Contributor

Does anyone do that already?

https://github.com/opening-hours/opening_hours.js/tree/master/src/holidays

Though from looking at opening-hours/opening_hours.js#456 it is not maintained anymore :(

LGPL licensed, see https://github.com/opening-hours/opening_hours.js/blob/master/package.json#L23

It should be enough to compile a data file with PHs for each country once a year from public sources.

I guess that relations may be also read for that to confirm whether things were missed (though I wonder if quality is good enough to make is worth doing)

@Fxsch
Copy link

Fxsch commented Feb 22, 2024

Is this being worked on? I saw that in Organic Maps a restaurant's opening hours weren't parsed and just being shown as a string, so I thought there was an issue with the data. It was actually just because it had PH in the opening hours and this app can't parse that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Map Data OpenStreetMap data related issues Opening Hours Business Hours, off time, holidays, seasonal Regional This issue is different depending on the country or region
Projects
None yet
Development

No branches or pull requests

5 participants