OpenStreetMap opening hours editor
The OpenStreetMap opening hours specification is fairly complex and does not readily lend itself to a simple and intuitive user interface.
However most of the time you will likely only be using a small part of the definition. The editor takes this in to account by trying to hide the more obscure features in menus and most of the time reducing the "on the road" use to small customizations of pre-defined templates.
This documentation is preliminary and a work in progress
Using the opening hours editor
If you have defined a default template (do this via the "Manage templates" menu item) it will be loaded automatically when the editor is started with an empty value. With the "Load template" function you can load any saved template and with the "Save template" menu you can save the current value as a template.
Naturally you can build an opening hours value from scratch, but we would recommend using one of the existing templates as a starting point.
If an existing opening hours value is loaded, an attempt is made to auto-correct it to conform to the opening hours specification. If that is not possible the rough location where the error occurred will be highlighted in the display of the raw OH value and you can try and correct it manually. Roughly a quarter of the OH values in the OpenStreetMap database have problems, but less than 10% can't be corrected, see OpeningHoursParser for more information on what deviations from the specification are tolerated.
Main menu button
- Add rule: add a new rule.
- Add rule for 24/7: add a rule for an object that is always open, the opening hours specification doesn't support any other sub values for 24/7 however we do allow adding of higher level selectors (for example year ranges).
- Load template: load an existing template.
- Save to template: save the current opening hours value as a template for future use.
- Manage template: edit, for example change the name, and delete existing templates.
- Refresh: re-parse the opening hour value.
Default rules are added as normal rules, this implies that they will override the values of previous rules for the same days. This can be a concern when specifying extended times, typically you will then want to switch the rules via the Show rule type menu entry to additive.
- Add modifier/comment: change the effect of this rule and add an optional comment.
- Add holiday: add a selector for public or school holidays.
- Add time span...
- Time - time: a start time to an end time on the same day.
- Time - extended time: a start time to an end time on the next day (example 26:00 is 02:00 (am) the next day.
- Var. time - time: from a start variable time (dawn, dusk, sunrise and sundown) to an end time on the same day.
- Var. time - extended time: from a start variable time to an end time on the next day.
- Time - var. time: a start time to an end variable time.
- Var. time - var. time: a start variable time to an end variable time.
- Time: a point in time.
- Time-open end: from a start point in time onwards.
- Variable time: at the variable time
- Variable time-open end: from a start variable time onwards
- Add week day range: add a weekday based selector.
- Add date range...
- Date - date: from a start date (year, month, day) to an end date.
- Variable date - date: from a start variable date (currently the specification only defines easter) to an end date.
- Date - variable date: from a start date to a variable date.
- Variable date - variable date: from a start variable date to an end variable date.
- Date - open end: from a start date onwards,
- Variable date - open end: from a start variable date onwards.
- With offsets...: the same entries as above however with offsets specified (this is rarely used).
- Add year range: add a year based selector.
- Add week range: add a week number based selector.
- Show rule type: display and allow changing of the rule type normal, additive and fallback (not available on the first rule).
- Move up: move this rule up one position (not available on the first rule).
- Move down: move this rule down one position.
- Delete: delete this rule.
To make editing time spans as easy as possible, we try to choose an optimal time range and granularity for the range bars when loading existing values. For new time spans the bars start at 6:00 (am) and have 15 minute increments, this can be changed via the menu.
Time span menu
- Switch to 15 minute ticks: use 15 minute granularity for the range bar.
- Switch to 5 minute ticks: use 5 minute granularity for the range bar.
- Switch to 1 minute ticks: use 1 minute granularity for the range bar, very difficult to use on a phone.
- Start at midnight: start the range bar at midnight.
- Show interval: show the interval field for specifying an interval in minutes.
- Delete: delete this time span.