[Tagging] Opening hours too long for OSM

Robin Schneider ypid at riseup.net
Thu Oct 11 22:02:26 UTC 2018


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/



More information about the Tagging mailing list