This is my first post so sorry if I break some rules.
I tried to add complex opening hours on a Park in Paris Georges-Brassens Park - Wikidata
The parc opens all year at the same hours (working days 8:00, weekend and French PH 9:00) but the closing hour changes all the time, as they try to more or less match sunset.
The closing hour changes when we switch between Summer and Winter time. I could not find a keywork for that so I used the next dates for the switch (I would have to update that after a year).
Also, the closing hour changes on the last day of February… I could not find a keyword for that, so I entered “Feb 29” (I would have to change that too).
In total, I came up with that string:
Oct 01-Oct 28: Mo-Fr 08:00-19:30; Oct 01-Oct 28: Sa,Su,PH 09:00-19:30 ; Oct 29-Feb 29: Mo-Fr 08:00-17:45; Oct 29-Feb 29: Sa,Su,PH 09:00-17:45 ;
Mar 01-Mar 23: Mo-Fr 08:00-19:00; Mar 01-Mar 23: Sa,Su,PH 09:00-19:00 ;
Mar 24-Apr 30: Mo-Fr 08:00-20:30; Mar 24-Apr 30: Sa,Su,PH 09:00-20:30 ;
May 01-Aug 31: Mo-Fr 08:00-21:30; May 01-Aug 31: Sa,Su,PH 09:00-21:30 ;
Sep 01-Sep 30: Mo-Fr 08:00-20:30; Sep 01-Sep 30: Sa,Su,PH 09:00-20:30
And the edit text box truncates this string as it is longer than 255 characters.
Any solution? As a temporary fix, I will just enter the current opening hours.
@Mapiste You don’t need to list them all individually. At least September and April can be merged. You can further group variations as additions to some base hours. This may allow less capable software to interpret the earliest closest time.
opening_hours=09:00-17:45, Mo-Fr 08:00-09:00, Mar 01-Mar 23 17:45-19:00, Oct 01 - Oct 28 17:45-19:30, Mar 24-Apr 30,Sep 1-Sep 30 17:45-20:30, May 01-Aug 31 17:45-21:30
I just tried my multi-lines specification and it worked with this tool.
OSM key and value strings can be at most 255 characters long and there is no widely accepted workaround. With other words you need to limit the opening hours value (just as for any other tag) to 255 characters.
As @Kovoschiz suggests simplifying the OH expression is the best approach.
PS: note that it is really 255 and not 256 characters as some might think.
@Kovoschiz Thanks for your very helpful answer. However, correct if I am wrong but
opening_hours=09:00-17:45, Mo-Fr 08:00-09:00
This will set the opening hour at 8:00 even on Public Holidays (when it falls between Monday and Friday). I will try to exclude PH, hoping that I don’t exceed the string limit.
@Kovoschiz I have read carefully the documentation and found all the answers! Key:opening_hours - OpenStreetMap Wiki
I can substract hours with the status off:
08:00-17:45, Sa-Su,PH 08:00-09:00 off
Also, for the day of Summer/Winter Time switch, I used the Su[-1] syntax (and an override):
Mar 01-Mar Su[-1] 17:45-19:00, Mar Su[-1]-Apr 30 17:45-19:00 and
Oct 01-Oct Su[-1] 17:45-19:30
Finally, you already solved my “last day of February” problem by using a base hour with a modifier on March.
You can see the final result in the evaluation tool opening_hours evaluation tool
I have checked key dates (Summer time, some Public Holidays) and it fits the hours shown at the entrance of the Park!
Thank you all for your help, if you visit this park one day, send me a DM for a guided tour