NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I was just trying to enter the opening hours for an observation tower in Milan, but there is not enough space for the syntax. Do you know of any workaround or fix? Below is what I tried to enter:

Tu 15:00-19:00,20:30-24:00;
We 10:30-12:30,15:00-19:00,20:30-00:00;
Th 15:00-19:00,20:30-00:00;
Fr 15:00-19:00,20:30-00:00;
Sa 10:30-14:00,14:30-19:30,20:30-00:00;
Su 10:30-14:00,14:30-19:30,20:30-00:00;
Sep 16-May 14: Mo,Tu,Th,Fr off;
Sep 16-May 14: We 10:30-12:30,16:00-18:30;
Sep 16-May 14: Sa 10:30-13:00,15:00-18:30,20:30-00:00;
Sep 16-May 14: Su 10:30-14:00,14:30-19:00

Note: If I don't add the months in front of each time period it will not work according to https://openingh.openstreetmap.de/evaluation_tool

asked 15 Mar '21, 11:39

rene78's gravatar image

rene78
700293342
accept rate: 0%

edited 15 Mar '21, 11:45


Rows 1, 3 and 4 can be merged, just as 2, 5 and 6.

Further the colons after the date ranges are not necessary.

Note: there is no work around for OH strings that are longer than 255 characters.

permanent link

answered 15 Mar '21, 11:53

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

edited 15 Mar '21, 11:55

Thanks, Simon! Haven't realized that they are similar. Even after this simplification the 255 chars limit is exceeded. I helped myself by merging row 8 and 10. Not ideal, since the opening hours are not the same on those days. Would be nice if it could be doubled to 512 (511) characters.

(15 Mar '21, 12:01) rene78
1

I think you can get under 255 when you reverse the order where to state the months/date ranges. Thus you avoid the off clause:

We 10:30-12:30,16:00-18:30;
Sa 10:30-13:00,15:00-18:30,20:30-00:00;
Su 10:30-14:00,14:30-19:00;
May 15-Sep 15 Tu,Th,Fr 15:00-19:00,20:30-24:00;
May 15-Sep 15 We 10:30-12:30,15:00-19:00,20:30-00:00;
May 15-Sep 15 Sa,Su 10:30-14:00,14:30-19:30,20:30-00:00;

It's under 255 once you remove the line breaks.

(15 Mar '21, 15:10) TZorn

Great solution, thanks!

(15 Mar '21, 22:49) rene78

You can merge the days with the same opening hours and use less characters, avoiding to state when the place is closed.

Tu 15:00-19:00,20:30-24:00; We 10:30-12:30,15:00-19:00,20:30-00:00; Th,Fr 15:00-19:00,20:30-00:00; Sa,Su 10:30-14:00,14:30-19:30,20:30-00:00; Sep 16-May 14 We 10:30-12:30,16:00-18:30; Sep 16-May 14 Sa 10:30-13:00,15:00-18:30,20:30-00:00; Sep 16-May 14 Su 10:30-14:00,14:30-19:00

permanent link

answered 15 Mar '21, 11:51

Mannivu's gravatar image

Mannivu
1.1k31027
accept rate: 6%

1

But the place is closed in the winter months on Mo,Tu,Th and Fr. This is no longer covered in your syntax.

(15 Mar '21, 11:58) rene78

If there are no opening_hours indicated, the app or database crawler reads it as closed, so there's no need to explicit it

(15 Mar '21, 12:00) Mannivu
1

Hmmm... at least openingh evaluation tool shows "Sep 16-May 14: Tu,Th,Fr" as open with your syntax.

(15 Mar '21, 12:18) rene78
1

Mannivu, you are mistaken here. The first couple of lines do show opening hours, so they need to be overridden by the off clauses. What you said would hold true if you added the months/day ranges also to the first couple of lines at the cost of inflating the whole statement again.

(15 Mar '21, 14:33) TZorn

Yes, you are right. I forgot that the specific time range must explicit all differences.

(15 Mar '21, 14:48) Mannivu
1

What you suggested, removing the off clause, does indeed work when we reverse summer and winter. See my comment to Simon's answer.

(15 Mar '21, 15:11) TZorn
showing 5 of 6 show 1 more comments

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×27
×4

question asked: 15 Mar '21, 11:39

question was seen: 1,203 times

last updated: 15 Mar '21, 22:49

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum