Key:opening_hours

From OpenStreetMap Wiki
Jump to: navigation, search
Help
Available languages
Deutsch English Français 日本語 Русский

opening_hours


One example for opening_hours

Description

opening_hours describes when something is open or closed.

Group

Properties

Element help

Can be attached on nodesCan be attached on waysCan be attached on areas

Useful combination
Implies

It is possible to enter opening hours for almost everything that has opening hours. Supermarkets and small convenience stores close in most countries at different times (even in the same city), in metropolitan areas there are often small shops open the whole night. Some pharmacies, gas stations, pubs and fast-food-restaurants are open 24/7. This is a very important information if you are looking for a certain facility at night.

Contents

How to Map

This is a property tag so it must go with a related tag e.g amenity=pharmacy, amenity=fuel, shop=convenience, amenity=biergarten, amenity=fast_food, amenity=library, amenity=parking, amenity=pub, amenity=restaurant, shop=supermarket, shop=bakery, or tourism=museum

Values

There's a webtool called TimeDomain which helps to determine the values.

Examples

applied to: any non-stop facilities (related tags), 24 hours 7 days a week
render on map: someting like object icon with a 24
applied to: opens only the weekend but nonstop, 24h
opening_hours=Mo 10:00-12:00,12:30-15:00; Tu-Fr 08:00-12:00,12:30-15:00; Sa 08:00-12:00
opening_hours=Mo-Su 08:00-18:00; Apr 10-15 off; Jun 08:00-14:00; Aug off; Dec 25 off
applied to: any facilities with opening hours (related tags)
render on map: nothing, info recovered by software
for exceptions in a range of days
applied to: any facilities with opening hours (related tags)
render on map: nothing, info recovered by software
applied to: opens every day between sunrise and sunset.
use round brackets to add a time offset, for example a park that opens 2 hours after sunrise and closes 2 hours before sunset (sunrise+02:00)-(sunset-02:00)
Sunday from 10:00 to open end or unknown closing time
applied to: any facilities with opening hours (related tags)
render on map: nothing, info recovered by software
open from 09:00 to 12:00 on fridays of odd weeks and on wednesdays of even weeks
applied to: any facilities with opening hours (related tags)
render on map: nothing, info recovered by software

Syntax

The above example means normal hours are monday to friday 9am to 5pm, except on public holidays it is 10am to 12pm, except public holidays that fall on a Sunday.

the general syntax for the value is: hh:mm-hh:mm (e.g.> 08:30-20:00)

the general syntax for the value is: wd hh:mm-hh:mm (e.g.> Fr 08:30-20:00)

the general syntax for the value is: mo md hh:mm-hh:mm (e.g.> Dec 25 08:30-20:00)

the general syntax for the value is: week we wd hh:mm-hh:mm (e.g.> week 25 Mo 08:30-20:00)

Rules

reads as: this opening hours for this days ; this opening hours for this days
This is used to indicate the 3rd Sunday of the month from 9am to 12pm.
Use -1 to indicate the last day of the month, eg Aug Th[-1] means last Thursday in July.
Can use grouping, (eg Su[1,3,5] and Su[1-3])
this way it can render a specific icon.

Implementation

This is my second try on an implementation:

Netzwolf 17:16, 26 November 2010 (UTC)

Rendering

just in the case of opening_hours=24/7 it can be something like adding a 24 to the object icon.

Pharmacy dispencing 24.png

rest of values have no rendering and should be accessed with context menu or alike.

Code

PHP code in SVN to parse opening_hours

See also

Notes

  1. 1.0 1.1 Values can be set as default. Default is a proposal for a default values system. This proposal can set default values such as maxspeed for areas (countries, states...) but also holidays periods. A country, a zone area can subscribe to a default containing such holidays definitions.
Personal tools
Namespaces
Variants
Actions
site
Toolbox