Zh-hant:Key:opening hours

From OpenStreetMap Wiki
Jump to: navigation, search
可用的語言 — Key:opening hours
· 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 bokmål · norsk nynorsk · occitan · Oromoo · oʻzbekcha/ўзбекча · Plattdüütsch · polski · português · português do Brasil · 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 · беларуская · български · қазақша · македонски · монгол · русский · тоҷикӣ · українська · Ελληνικά · Հայերեն · ქართული · नेपाली · मराठी · हिन्दी · অসমীয়া · বাংলা · ਪੰਜਾਬੀ · ગુજરાતી · ଓଡ଼ିଆ · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · සිංහල · ไทย · မြန်မာဘာသာ · ລາວ · ភាសាខ្មែរ · ⵜⴰⵎⴰⵣⵉⵖⵜ · አማርኛ · 한국어 · 日本語 · 中文(简体)‎ · 吴语 · 粵語 · 中文(繁體)‎ · ייִדיש · עברית · اردو · العربية · پښتو · سنڌي · فارسی · ދިވެހިބަސް
Public-images-osm logo.svg opening_hours
OpenClosed.png
描述
描述開放與關門的時間
组: Properties
元素
may be used on nodes may be used on ways may be used on areas use on relations unspecified 
状态: 未定义

只要某處有固定的營業時間,在OSM上我們幾乎都可以正確描述不同的營業時間組合。在大部分的國家,超級市場以及小型便利商店的關門時間幾乎都不同(就算處於相同城市),在大都市則常常會看到整晚營業的小商店。部分的藥局、加油站、酒吧以及速食餐廳則是廿四小時營業。如果你想尋找晚上有營業的商家,營業時間標籤將會是很常用到的。

如何繪製

這個標籤是一個附屬內容標籤(property tag),所以必須要跟著一個主要的說明標籤。例如

輸入值Values

在標記路線Way的時候,請參閱Key:access

TimeDomain這個網頁工具可以協助判斷輸入值。週一到週日以及月份的輸入請統一使用英文。

範例

  • 24/7
適用於:所有一週七天、一天24小時不關閉的地點(或相關的標籤)。
地圖上顯示為:帶著數字24的圖示。
  • Sa-Su 00:00-24:00
適用於:只在週末開放,但24小時營業者。
  • Mo-Fr 08:30-20:00 ,如果是更複雜的開放時間:
Mo 10:00-12:00,12:30-15:00; Tu-Fr 08:00-12:00,12:30-15:00; Sa 08:00-12:00
Mo-Su 08:00-18:00; Apr 10-15 off; Jun 08:00-14:00; Aug off; Dec 25 off
適用於:有標記營業時間(或相關標籤)的所有地點。
在地圖上顯示為:不顯示,會由軟體辨識。
  • Mo-Sa 10:00-20:00; Tu off 或是 Mo-Sa 10:00-20:00; Tu 10:00-14:00
在某幾個星期幾的開放時間有例外時使用。
適用於:有標記營業時間(或相關標籤)的所有地點。
在地圖上顯示為:不顯示,會由軟體辨識。
  • sunrise-sunset
適用於:開放時間在日出到日落之間的地點。
使用半形圓形括弧來標記前後時間,例如某公園的營業時間為「日出前兩小時開放,直到日落前兩小時關閉」請輸入 (sunrise+02:00)-(sunset-02:00)
  • Su 10:00+
週日早上十點開放,不知道什麼時候會關閉
適用於:任何有開放時間的地點(或相關標籤)
在地圖上顯示為:不顯示,會由軟體辨識。
  • week 1-53/2 Fr 09:00-12:00; week 2-52/2 We 09:00-12:00
單週週五或雙週週三的早上九點到十二點開放
適用於:任何有開放時間的地點(或相關標籤)
在地圖上顯示為:不顯示,會由軟體辨識。

語法Syntax

  • wd weekday, available: Mo · Tu · We · Th · Fr · Sa · Su (e.g., > Fr 08:30-20:00)
  • hh hour, always two digits number in 24h basis (no am/pm), in the format "hh:mm" · (e.g., > Fr 08:30-20:00)
  • mm minute, always two digits number in the format "hh:mm" (e.g., > Fr 08:30-20:00)
  • mo month, available: Jan · Feb · Mar · Apr · May · Jun · Jul · Aug · Sep · Oct · Nov · Dec · "mo md" (e.g., > Dec 25)
  • md monthday, always two digits number in the format · "mo md" (e.g., > Dec 25)
  • we week number, always a two digit number in range 01-53, in the format "week we" (e.g., > week 25 Mo 08:30-20:00)
  • SH School Holiday, can be used to indicate different opening hours during school holidays (e.g., Mo-Fr 08:00-09:00,14:00-15:00; SH off) [1]
  • PH Public Holiday, can be used to indicate different opening hours during public holidays (e.g., Mo-Fr 09:00-17:00; PH 10:00-12:00; PH Su off)[1]
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 mo-mo: wd hh:mm-hh:mm (e.g. Jun-Aug: Su 10:30-16:00 to specify the opening times on Sundays in June, July and August. Note the colon, mentioned under "Calendar Ranges" here).

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

規則Rules

  • Consecutive hours [always needs open-close] separated by "-" · (e.g., > 08:30-20:00)
  • Consecutive weekdays open separated by "-" · (e.g., > Mo-Fr)
  • Consecutive monthdays open separated by "-" · (e.g., > Dec 20-26) or (e.g., > Dec 20-Jan 06)
  • Open with periodicity "n" within a range of consecutive monthdays, the range is followed by "/n" (e.g., > 02-30/n)
  • Consecutive weeks open separated by "-" · (e.g., > week 01-26)
  • Open with periodicity "n" within a range of consecutive weeks, the range is followed by "/n" ( e.g.> week 02-52/n )
  • A break on days separated by "," · (e.g., > Mo,We,Fr)
  • A break on hours separated by "," · (e.g., > 08:30-14:00,16:30-20:00)
  • Different hours on different days are separated by ";" (e.g., > Mo 10:00-12:00,12:30-15:00; Tu-Fr 08:00-12:00,12:30-15:00; Sa 08:00-12:00)
reads as: this opening hours for this days ; this opening hours for this days
  • A weekday off will be tagged as "wd off" (e.g., > Tu off)
  • A range of weekdays off will be tagged as "wd-wd off" (e.g., > Tu-Th off)
  • A month off will be tagged as "mo off" (e.g., > Aug off )
  • A range of months off will be tagged as "mo-mo off" (e.g., > Aug-Sep off)
  • A monthday off will be tagged as "mo md off" (e.g., > Dec 25 off)
  • A range of monthdays off will be tagged as "mo md-md off" (e.g., > Dec 24-26 off) or "mo md - mo md off" (e.g., > Dec 25-Jan 06 off )
  • Exceptions to a range of days, first the range then the exception (e.g., > Mo-Sa 10:00-20:00; Tu off) or (e.g., > Mo-Sa 10:00-20:00; Tu 10:00-14:00) (this means these are not additions, for example Mo-Fr 08:00-12:30; We 14:00-17:00 means that on Wednesdays, the shop is only opened in the afternoons and not additionally)
  • If it is in the first or last day of a range then don't use the exception rule, use the usual (e.g., > Mo-Fr 10:00-20:00; Sa 10:00-14:00)
  • Non-consecutive or semi-consecutive days of the week will be tagged as wd[x] (e.g., Su[3] 09:00-12:00)
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; e.g., Aug Th[-1] means last Thursday in July.
Can use grouping, (e.g., Su[1,3,5] and Su[1-3])
  • If hours are non stop some days then (e.g., > 00:00-24:00)
  • If it is 24 hours 7 days a week it has a specific value: 24/7
this way it can render a specific icon.
  • A special time value to mark the time the sun rises is: sunrise.
  • A special time value to mark the time the sun sets is: sunset.
  • A + behind a time means "from" or "open end" (e.g., Sa 22:00+)

應用Implementation

This is my second try on an implementation:

Netzwolf 17:16, 26 November 2010 (UTC)

AMDmi3 10:44, 18 December 2012 (UTC)

Code

Rendering

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

Pharmacy dispencing 24.png

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

Implementations

OsmAnd

OsmAnd uses this tag in the POI search screen. The colour of the arrow changes when the POI is open, closed or the state is unknown. The implementation is only partial, currently no dates, weeknumbers or holidays are supported, But most values should get parsed.

Screenshot of Osmand 0.8.1 taken on 2012-07-27 showing the feature of displaying the direction arrows in green or red (or grey if unknown) depending of the tagging of opening_hours on each object in the raw OSM data.

Opening hours for Ulm, Neu-Ulm & surroundings

The web application is available on http://oeffnungszeiten.ulmApi.de. Opening hours for the local area are visualized on a map. The source code of this application is freely licensed and available via GitHub. Adapting the application to a different city is very easy and described on the GitHub page.

Ulm-oeffnungszeiten.jpg

Other

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.