Mapping opening hours correctly can be a pain; the format for the
opening_hours key can be hard to remember. I didn't use to do it much for that reason. Until I recently discovered that there's a JOSM plugin for that! It works really well, let me show you how I added hours of a local restaurant in seconds.
First, of course, make sure you have the plugin installed:
Then, select the thing you want to add opening hours for:
And select 'Edit Opening Hours' from the Data menu (or use the keyboard shortcut).
If the plugin detects an existing
opening_hours tag, it will offer to edit that, or you can create it. It will then offer a graphical interface for setting the hours:
You can move and drag blocks as you would expect. The plugin will parse it in the expected format. A nice little extra is that it supports the 'open end' hours in the format
17:00+ - useful for places that don't have a set closing hour but instead say 'open till late' or something similar.
Perhaps old news to y'all, but it made me happy :)
A Word Of Caution
Several people have pointed out (link is to the German forum) that the plugin is limited in what it can do. It will not cover most complex cases, like exceptions for public holidays and month to month variations) and does not seem to properly cover some of the simpler cases.
I still feel that it is good for a lot of basic opening hours tagging, but please review the opening_hours specification.
There is also a validator tool that I don't quite understand how to use, perhaps someone can explain in the comments?