Open Sir-Photch opened 1 month ago
Feel free. Does that require any changes to the OpeningSchedule
interface? Or is it just an implementation detail?
Also, would you prefer this change to be a seperate PR or can I just include it in https://github.com/MM2-0/Kvaesitso/pull/772?
I'd prefer it in a separate PR, so that it doesn't block #772 from being merged.
Does that require any changes to the OpeningSchedule interface?
Probably not; Creating some OpeningSchedule
instance from results returned by that library should still be possible. We can also just skip tracking any season- or month specifics since we only show weekly previews; That is, I'd create the OpeningSchedule
instance based on the library result and the users LocalTime.
I have come accross some cases where our current parsing of the OSM
opening_hours
tag is not correct. While digging into the issue, I discovered that in the meantime of merging the OSM PR, some new libraries for just that have popped up. One of them is https://github.com/westnordost/osm-opening-hours which is also used in https://github.com/streetcomplete/StreetComplete.I suggest migrating to that library instead of re-inventing the wheel, since also, our implementation does not cover month- or season-specific opening hours. What do you think?
Also, would you prefer this change to be a seperate PR or can I just include it in #772?