[Tagging] Opening hours too long for OSM

Tobias Zwick osm at westnordost.de
Fri Oct 12 22:46:47 UTC 2018


It is already part of the specification that "Mo-Fr 9-17" is possible.
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 <ypid at 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 at openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/tagging
> 
> _______________________________________________
> Tagging mailing list
> Tagging at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/tagging
> 




More information about the Tagging mailing list