From OpenStreetMap Wiki
Jump to: navigation, search
Langues disponibles — JOSM/Plugins/OpeningHoursEditor
Afrikaans Alemannisch aragonés asturianu azərbaycanca Bahasa Indonesia Bahasa Melayu Bân-lâm-gú Basa Jawa Baso Minangkabau bosanski brezhoneg català čeština dansk Deutsch eesti English español Esperanto estremeñu euskara français Frysk Gaeilge Gàidhlig galego Hausa hrvatski Igbo interlingua Interlingue isiXhosa isiZulu íslenska italiano Kiswahili Kreyòl ayisyen kréyòl gwadloupéyen kurdî latviešu Lëtzebuergesch lietuvių magyar Malagasy Malti Nederlands Nedersaksies norsk norsk nynorsk occitan Oromoo oʻzbekcha/ўзбекча Plattdüütsch polski português română shqip slovenčina slovenščina Soomaaliga suomi svenska Tiếng Việt Türkçe Vahcuengh vèneto Wolof Yorùbá Zazaki српски / srpski беларуская български қазақша македонски монгол русский тоҷикӣ українська Ελληνικά Հայերեն ქართული नेपाली मराठी हिन्दी অসমীয়া বাংলা ਪੰਜਾਬੀ ગુજરાતી ଓଡ଼ିଆ தமிழ் తెలుగు ಕನ್ನಡ മലയാളം සිංහල ไทย မြန်မာဘာသာ ລາວ ភាសាខ្មែរ ⵜⴰⵎⴰⵣⵉⵖⵜ አማርኛ 한국어 日本語 中文(简体)‎ 吴语 粵語 中文(繁體)‎ ייִדיש עברית اردو العربية پښتو سنڌي فارسی ދިވެހިބަސް

OpeningHoursEditor icon OpeningHoursEditor
extended options for editing opening_hours

OpeningHoursEditor is a plugin for JOSM. It provides a graphical editor for editing opening_hours. It can also be used to edit other time related tags like collection_times for postboxes or lit for highways. At the moment the plugin is still in development. The main development is made by User:Boman.

Note that this plugin does only understand a subset of the approved syntax of opening_hours and will not work if features are used which it does not understand. Have a look at the wiki page for opening_hours and the Key:opening_hours:specification. In case features like holidays, opening_hours based on sunrise/sunset, months, years and so on are needed you can check out the evaluation tool.


menuentry of the plugin

For installation see JOSM/Plugins#Installation. After restarting JOSM you should have a new menu-entry under 'Data' called 'Edit opening hours'.


Select one or more Elements and press 'Data'->'Edit opening hours'. Select the key you want to edit. The key with the best matching is already selected, so you can press enter if you agree. Otherwise you have the possibility to choose one of the existing tags or to create a new tag.

Now the OpeningsHourEditor dialog will open and you can edit your chosen key. The value with the most occurrences is already inserted in the value field. You can drag the mouse inside the time-planner to create a rectangle. You can move and resize the rectangles by dragging with the mouse at the borders of the rectangle. By clicking right on a rectangle you can choose 'open end' the colour of the rectangle becomes red. You can also create a single time-point (for example: Mo-Fr 09:15) by setting the height of the rectangle to 0, the colour of the rectangle will change to green.

You can also delete a rectangle by changing its width or height to 0 or less.


Report bugs and feature wishes via the JOSM-trac and set the Component of the ticket to "Plugin openinghourseditor".


Source code can be found in svn.

Revision History

A list of major updates to the plugin.

Date Version Changes
2012-07-12 28477 bugfix #7844 fixing a NullPointerException when dragging the mouse in the greyed out editor and bugfix #7334 fixing small graphic glitch of the weekday lines in the editor
2011-10-12 26838 bugfix #6927 for Windows popup-menu and enhancement ticket #6927 for remembering the latest editmode
2011-06-31 26219 Choosing between 12 and 24 hour clock possible. The default is selected by the configured localization. See enhancement ticket #6359
2011-05-16 26002 added the possibility to edit more than one object simultaneous
2011-01-31 25190 minimal JOSM version set to 3835, due to changes in JOSM
2010-11-17 24290 Fixes Ticket #5554


The plugin is reading the value from the tag and parse it for showing the times in the GUI. This is the grammar which is used for parsing:

DIGIT ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
WEEKDAY ::= "Mo" | "Tu" | "We" | "Th" | "Fr" | "Sa" | "Su"
PLUS ::= "+"
OFF ::= "off"

startCompile ::= "24/7" | timespanlist
timespanlist ::= timespan [ "; " timespanlist ]
timespan ::= [ dayspanlist " " ] daytimespanlist

daytimespanlist ::=	daytimespan [ "," daytimespanlist ]
daytimespan ::= off | ( daytime ( openend |  [ "-" daytime ]) )
daytime ::=	(DIGIT DIGIT ":" DIGIT DIGIT )
openend ::= PLUS
off ::= OFF

dayspanlist ::=	dayspan [ "," dayspanlist ]
dayspan ::=	WEEKDAY [ "-" WEEKDAY ]