Help on opening_hours needed


I have a rather complicated value for opening_hours, here is what I have so far:

Jan: 08:00-17:00; Feb 01-Feb 15: 08:00-17:00; Feb 16-Feb 29: 08:00-18:00; Mar 01-Mar 15: 07:15-18:00; Mar 16-Apr 15: 07:15-19:00; Apr 16-Aug 31: 07:15-20:00; Sep 01-Oct 31: 07:15-19:00; Nov: 07:15-17:00; Dec: 08:00-17:00;

But I need another exception: On PH and Su the facility always opens at 08:0. (So Jan, Feb and Dec are already correct). How can I archive this?


I think I got it:

Jan: 08:00-17:00;Feb 01-Feb 15: 08:00-17:00;Feb 16-Feb 29: 08:00-18:00;Mar 01-Mar 15: Mo-Sa 07:15-18:00;Mar 01-Mar 15: PH,Su 08:00-18:00;Mar 16-Apr 15: Mo-Sa 07:15-19:00;Mar 16-Apr 15: Su,PH 08:00-19:00;Apr 16-Aug 31: Mo-Sa 07:15-20:00;Apr 16-Aug 31: Su,PH 08:00-20:00;Sep-Oct: Mo-Sa 07:15-19:00;Sep-Oct: Su,PH 08:00-19:00;Nov: Mo-Sa 07:15-17:00;Nov: Su,PH 08:00-17:00;Dec: 08:00-17:00


But now I have the problem, that it is too long. Anyone any idea on how to shorten it? I could merge Jan and Dec, but still too long:

Jan,Feb 01-Feb 15,Dec: 08:00-17:00;
Feb 16-Feb 29: 08:00-18:00;
Mar 01-Mar 15: Mo-Sa 07:15-18:00;
Mar 01-Mar 15: Su,PH 08:00-18:00;
Mar 16-Apr 15: Mo-Sa 07:15-19:00;
Mar 16-Apr 15: Su,PH 08:00-19:00;
Apr 16-Aug 31: Mo-Sa 07:15-20:00;
Apr 16-Aug 31: Su,PH 08:00-20:00;
Sep-Oct: Mo-Sa 07:15-19:00;
Sep-Oct: Su,PH 08:00-19:00;
Nov: Mo-Sa 07:15-17:00;
Nov: Su,PH 08:00-17:00

Besides learning about the day range format and comma vs semi-colon (including ordering), you need to split and combine them with the lowest common periods across months. I don’t handle complicated cases often, so someone could double check this for me.

opening_hours=Mar-Nov 07:15-08:00; Su,PH 08:00-17:00; 08:00-17:00, Feb 16-29,Mar-Oct 17:00-18:00, Mar 16-31,Apr-Oct 18:00-19:00, Apr 16-30,May-Aug 19:00-20:00

To be sure, you should add opening_hours:url= if available.

thanks, I randomly checked some dates and it seems to be correct. Thank you! Unfortunately I don’t know a url for the opening_hours.