simonpoole / OpeningHoursParser

Parser for string values according to the OSM opening hours specification
MIT License
32 stars 12 forks source link

Spec allows holidays after weekdays #48

Closed jb-wisemo closed 4 years ago

jb-wisemo commented 4 years ago

The syntax in the spec allows "weekday_sequence,holiday_sequence" or "holiday_sequence,weekday_sequence" (See https://wiki.openstreetmap.org/wiki/Key:opening_hours/specification ) Thus "PH,Sa-Su" and "Sa-Su,PH" are both acceptable. But "Sa,PH,Su" is against a strict interpretation. But the parser apparently allows "Sa-Su,PH" only in "relaxed" mode, which has already resulted in a bugreport against JOSM, which someone rejected claiming the spec didn't allow it (https://josm.openstreetmap.de/ticket/19339 )

simonpoole commented 4 years ago

Besides that fact that you are mistaken, because the spec didn't actually allow PH after a weekday sequence, till it was ad hoc "adjusted" (mainly because the implementation of the adjuster wasn't actually specification conformant) in March of this year. I've given in and the current version allows the PH after weekdays, this is also the version that JOSM currently has as a dependency.

In summary you are barking up a non-existent tree.

For reference https://wiki.openstreetmap.org/w/index.php?title=Template%3AKey%3Aopening_hours%2Fspecification_table&type=revision&diff=1964118&oldid=1933393

jb-wisemo commented 4 years ago

I was not aware of the spec edit, assuming such pages were "protected". JOSM provides an empty changelog for their latest build and none of the existing bugs mentioned the parser update, so I had to assume nothing changed at their end either. Leaving this closed as probably fixed in latest builds.