Am 13.10.2018 um 13:36 schrieb Tobias Zwick: > Oh, you are right. I am sorry. So that opening hours tool understands > more than what is defined in the specification.
Everybody that has written a OH parser needs to add a non-strict mode in one way or the other, or else you wouldn't be able to parse a large part (~15%) of the existing strings that are meaningful. See for example https://github.com/simonpoole/OpeningHoursParser (note that a really strict mode would throw out quite a bit more). Simon > > On 13/10/2018 12:35, Simon Poole wrote: >> >> Am 13.10.2018 um 00:46 schrieb Tobias Zwick: >>> It is already part of the specification that "Mo-Fr 9-17" is possible. >> Actually it isn't, see >> https://wiki.openstreetmap.org/wiki/Key:opening_hours/specification >> >> I don't think discussing changes to the opening_hours grammar is this >> thread is a sensible thing to do, most of the changes proposed are not >> unambigously parseable and would require us to rely even more on >> heuristics than we do now to make sense of the values. There a small >> number of additions that could make sense and make things easier >> (seasons and some more variable holidays), but they tend to fit in to >> the existing schema. >> >> Simon >> >> >>> Alas, QA tools / the openinghours evaluation tool emit a warning in this >>> case: "Time range without minutes specified. Not very explicit! Please >>> use this syntax instead "9:00-17:00"." >>> Not sure why that is not seen as explicit. >>> >>> On 12/10/2018 22:29, bkil wrote: >>>> That looks like a nice improvement. >>>> >>>> Additionally, I've always wondered why we need to enter :00 after >>>> every hour and zero pad the hours? The shops themselves usually post >>>> the opening hours as 9-17 - why can't we use this human friendly >>>> abbreviation? I don't feel that it would be that much harder to parse. >>>> (9-17h would also work for me) 9-17:30 and 9:30-17 are still >>>> unambiguous (though, the latter looks a bit uglier at first). >>>> >>>> I think this would greatly improve readability, make data entry faster >>>> and less error prone and shorten the field all at the same time. >>>> >>>> Is this fit for a proposal? >>>> >>>> On Fri, Oct 12, 2018 at 12:04 AM Robin Schneider <y...@riseup.net> wrote: >>>>> On 10/11/18 11:47 PM, Jmapb wrote: >>>>>> On 10/11/2018 5:21 PM, Tobias Zwick wrote: >>>>>> >>>>>>> Hey there! >>>>>>> >>>>>>> So, a user of StreetComplete came across the following complicated >>>>>>> opening hours for a shop (prettified): >>>>>>> >>>>>>> Jun-Sep: Mo-Sa 10:00-18:00; >>>>>>> Jun-Sep: Su 10:00-12:00; >>>>>>> Nov-Mar: Mo,Tu,Th,Fr 10:00-12:00, 15:00-17:00; >>>>>>> Nov-Mar: Sa 10:00-12:00; >>>>>>> Apr-May: Mo-Fr 10:00-12:30,15:00-18:00; >>>>>>> Apr-May: Sa 10:00-12:30; >>>>>>> Apr-May: Su 10:00-12:00; >>>>>>> Oct: Mo-Fr 10:00-12:30,15:00-18:00; >>>>>>> Oct: Sa 10:00-12:30; >>>>>>> Oct: Su 10:00-12:00 >>>>>>> >>>>>>> Unfortunately, this does not fit into the opening_hours value, as this >>>>>>> is limited to 255 characters. What can we do? >>>>> Hey :) >>>>> >>>>> I would say your best bet is to try to shorten the opening_hours values >>>>> using >>>>> every little trick that the syntax has to offer, for example you can join >>>>> the >>>>> month ranges which is enough to bring you under 255 characters. >>>>> >>>>> Jun-Sep: Mo-Sa 10:00-18:00; >>>>> Nov-Mar: Mo,Tu,Th,Fr 10:00-12:00,15:00-17:00; >>>>> Nov-Mar: Sa 10:00-12:00; >>>>> Apr-May,Oct: Mo-Fr 10:00-12:30,15:00-18:00; >>>>> Apr-May,Oct: Sa 10:00-12:30; >>>>> Apr-May,Jun-Oct: Su 10:00-12:00 >>>>> >>>>> You can then use the "value to compare to the first value:" feature of >>>>> https://openingh.ypid.de/evaluation_tool/ to check that you still >>>>> preserved the >>>>> original meaning. >>>>> >>>>> I don’t have much to add in case you can not bring the value under 255 >>>>> only that >>>>> I also don’t know any software which would handle that. I guess having the >>>>> special cases in an additional tag and `opening_hours` fully valid would >>>>> be best >>>>> then. >>>>> >>>>> opening_hours=Jun-Sep: Mo-Sa 10:00-18:00; Su10:00-12:00; Nov-Mar: >>>>> Mo,Tu,Th,Fr 10:00-12:00, 15:00-17:00; Sa 10:00-12:00; Apr-May: Mo-Fr >>>>> 10:00-12:30,15:00-18:00; Sa 10:00-12:30; Su 10:00-12:00; Oct: Mo-Fr >>>>> 10:00-12:30,15:00-18:00; Sa 10:00-12:30;Oct: Su 10:00-12:00 >>>>> >>>>> This won’t work. I had an idea for doing that but this is not supported >>>>> yet: >>>>> https://github.com/opening-hours/opening_hours.js#todo >>>>> >>>>> -- >>>>> Live long and prosper >>>>> Robin `ypid` Schneider -- https://me.ypid.de/ >>>>> >>>>> _______________________________________________ >>>>> Tagging mailing list >>>>> Tagging@openstreetmap.org >>>>> https://lists.openstreetmap.org/listinfo/tagging >>>> _______________________________________________ >>>> Tagging mailing list >>>> Tagging@openstreetmap.org >>>> https://lists.openstreetmap.org/listinfo/tagging >>>> >>> _______________________________________________ >>> Tagging mailing list >>> Tagging@openstreetmap.org >>> https://lists.openstreetmap.org/listinfo/tagging >> >> >> >> _______________________________________________ >> Tagging mailing list >> Tagging@openstreetmap.org >> https://lists.openstreetmap.org/listinfo/tagging >> > > _______________________________________________ > Tagging mailing list > Tagging@openstreetmap.org > https://lists.openstreetmap.org/listinfo/tagging
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Tagging mailing list Tagging@openstreetmap.org https://lists.openstreetmap.org/listinfo/tagging