simonpoole / OpeningHoursFragment

Android UI element for displaying and editing an opening hours value
MIT License
9 stars 2 forks source link

opening hour added using Vespucci fails validation #26

Closed matkoniecz closed 5 years ago

matkoniecz commented 6 years ago

I edited https://www.openstreetmap.org/node/3112433237

Now I noticed that it https://openingh.ypid.de/?zoom=18&lat=50.0795&lon=19.89033&layers=B0T&tags=opening_hours&filter=none fails validation (see https://openingh.ypid.de/evaluation_tool/?EXP=Th%2017%3A30-19%3A30%3B%20Jul-Sep%2019%20off&lat=50.0801246&lon=19.8888371 )

I am not sure what is wrong - Vespucci, opening hours specification or ypid tool.

simonpoole commented 6 years ago

In this case the ypid tool is correct, the "error" is that the specification doesn't allow

<month>-<month> <daynum>

but only either

<month> <daynum>-<month> <daynum>

or <month>-<month>

On the one hand we should likely throw a parse error here and on the other stop allow adding of this. This will require a separate menu entry (which I wanted to avoid which is why we have this issue).

See https://wiki.openstreetmap.org/wiki/Key:opening_hours/specification

simonpoole commented 5 years ago

This is fixed in the parser now (in non-strict mode it will try to add a missing and otherwise complain.