This page is a draft for a concise and mapper-centric opening hours page. The aim is to have this page replace Key:opening_hours.
Primary focus: mappers. This page should be written for mappers. All technical stuff for developers should be moved to subpages.
|Describes when something is open or closed. There is a specific standard format for this data.|
|Used on these elements|
|Documented values: 1|
|Status: de facto|
|Tools for this tag|
The opening_hours=* key allows you to indicate when a shop, amenity, or any other kind of facility is accessible to the public. In fact, every facility operates at different times: some supermarkets are open during the day, some gas stations are open 24/7, some pubs are open during night...
If this information is mapped, everyone can know when a facility is open, making it easier for example to find shops open during night or Sunday.
This section is a quick tutorial to get you started with the opening hours syntax.
If you are a developer wanting to write a parser or generator for this key, see the full specification, which provides a complete overview of the syntax tailored to developers.
- You should use the common English day abbreviations as in this table:
|Abbreviation||Day of week|
Multiple opening intervals
|same as above, but closed from 12:00 to 13:00 (noon to 1 PM)|
- Add the two time intervals in which they are open, separated by a comma (,).
|opening_hours=Mo-Fr 08:00-12:00,13:00-17:30; Sa 08:00-12:00|
|same as above, also open on Saturday mornings|
- Add the opening hours for each day range, separated by a semicolon and space (; ).
Closed on holidays
|opening_hours=Mo-Fr 08:00-12:00,13:00-17:30; Sa 08:00-12:00; PH off|
|same as above, but closed on public holidays|
PHas if it were a weekday. Instead of hours, use
offto say they're closed all day.
SHfor school holidays. Although this is rare, you can also use both
SHon the same object, e.g. opening_hours=Mo-Fr 08:00-12:00,13:00-17:30; Sa 08:00-12:00; PH off; SH off
(optional reading) Different hours on holidays
|opening_hours=Mo-Fr 08:00-12:00,13:00-17:30; Sa 08:00-12:00; PH 09:00-12:00|
|on holidays, they are open from 09:00 to 12:00|
- As said before,
PHis just like a weekday. Because it is to the right of the rest of the rules, it overwrites them. For more information on which rules take precedence, see this more elaborate guide.
To learn how to map more complex cases, you can read the detailed description of the opening hours syntax.
A technical syntax definition, aimed at developers, can be found in the specification.
If you already know how to map opening hours but want a quick look at how a particular thing is expressed, you can look at this example that uses a lot of the syntax:
opening_hours=2015 Jan 12-2016 Jul 29 day 1-20 week 01-40/2 Mo,We-Fr 08:00-09:00 open "only vegetables",16:00-(sunset-01:00) || "on appointment"; PH off
Open from 12 January 2015 to 29 July 2016, but only on the 1st through the 20th day of the month, in weeks 1, 3, 5, ... 37, 39 of the year, but only on Mondays, Wednesdays, Thursdays, and Fridays: open from 8:00 to 9:00, but with comment "only vegetables", and open from 16:00 to one hour before sunset.
If the above does not match, use comment "on appointment", but on public holidays no appointments are accepted.
How to map
This is a property of other objects. It must go with a main tag describing what the object is, e.g.
Opening hours should not be used on roads; you are probably looking for conditional access restrictions.
Also check out the tutorial in which an example is fully worked out.
Here are some common examples of opening hours.
a restaurant that is open everyday from 11:30 to 15:00 and 19:00 to 23:00
an office that is open every business day, from 09:00 to 18:00
To add the opening hours information on OpenStreetMap objects, you have several options:
- Write it by hand in any editor, following the syntax definition above. You can validate it using the opening hours evaluation tool.
- For JOSM users, you can install the OpeningHoursEditor, which displays a simple week calendar. It only supports a basic weekly scheme, and anything more complex can not be created with it.
- You can use the website YoHours to create the opening hours value, and then paste the generated value in any OSM editor.
See the Implementations sub-page for a list of websites, applications or libraries using opening hours.
The default style () does not take into account this tag.
For a list of online maps showing opening hours, see Implementations § Online maps.
- Conditional restrictions — using opening_hours syntax for time-based conditions
- Key:lit — artificial light sources
- Key:collection_times — for post boxes and recycling points
- Key:service_times — for churches and other features that have different service times than opening hours
- Key:happy_hours — for times when alcoholic drinks are offered at a discount
- Tags that were deprecated by this one