Did not recognize date. Try slightly modifying the date in the first parameter.

文件圖示 模板文件[檢視] [編輯] [歷史] [清除快取]

{{Start-date}}、{{Birth-date}}和{{End-date}}(也可使用{{Death-date}})是易於閱讀的「純文本」日期和時間模板,可為事件生成微格式日期。{{Start date}}/{{Birth date}}和{{End date}}/{{Death date}}模板也可生成微格式,但要求日期以標準、明確和國際化的ISO語法表達。而本模板支持「模糊」日期和時間。對於不知道確切時間、日期或月份的事件,用戶可以省略這些細節。時區假定為事件所在地的時區。如果指定了時區信息,則必須設置可選的時區參數。

示例

編輯
{{Start-date}}、{{Birth-date}}、{{End-date}}及{{Death-date}}的示例(顏色僅用於強調)
下面的示例顯示1941年12月7日 (1941-12-07),並生成隱藏的微格式日期:1941-12-07
{{start-date|December 7, 1941}} → 1941年12月7日 (1941-12-07)
{{birth-date|December 7, 1941}} → 1941年12月7日 (1941-12-07)
{{end-date|December 7, 1941}}   → 1941年12月7日 (1941-12-08)
{{death-date|December 7, 1941}}   → 1941年12月7日 (1941-12-08)
下面的示例顯示1941年12月7日 (1941-12-07),並生成隱藏的微格式日期:1941-12-07
{{start-date|7 December 1941}} → 1941年12月7日 (1941-12-07)
{{birth-date|7 December 1941}} → 1941年12月7日 (1941-12-07)
{{end-date|7 December 1941}}   → 1941年12月7日 (1941-12-08)
{{death-date|7 December 1941}}   → 1941年12月7日 (1941-12-08)
下面的示例演示了如何顯示日期、時區和時、分、秒(順序通常並不重要)。顯示5:43PM HST, December 7th, 1941 03:43 (1941-12-08UTC03:43Z),並生成隱藏的微格式日期(修正為UTC):1941-12-08T03:43Z
{{start-date|5:43PM HST, December 7th, 1941|tz=y}} → 5:43PM HST, December 7th, 1941 03:43 (1941-12-08UTC03:43Z)
{{birth-date|5:43PM HST, December 7th, 1941|tz=y}} → 5:43PM HST, December 7th, 1941 03:43 (1941-12-08UTC03:43Z)
{{end-date|5:43PM HST, December 7th, 1941|tz=y}}   → 5:43PM HST, December 7th, 1941 03:44 (1941-12-08UTC03:44Z)
{{death-date|5:43PM HST, December 7th, 1941|tz=y}}   → 5:43PM HST, December 7th, 1941 03:44 (1941-12-08UTC03:44Z)
下面的示例演示了通過提供當地位置來生成UTC值。顯示1941年12月8日 03:20 (1941-12-08UTC03:20Z),並生成隱藏的微格式日期(修正為UTC):1941-12-08 T03:20Z
{{start-date|December 8, 1941 12:50PM Australia/Adelaide|tz=y}} → 1941年12月8日 03:20 (1941-12-08UTC03:20Z)
{{birth-date|December 8, 1941 12:50PM Australia/Adelaide|tz=y}} → 1941年12月8日 03:20 (1941-12-08UTC03:20Z)
{{end-date|December 8, 1941 12:50PM Australia/Adelaide|tz=y}}   → 1941年12月8日 03:21 (1941-12-08UTC03:21Z)
{{death-date|December 8, 1941 12:50PM Australia/Adelaide|tz=y}}   → 1941年12月8日 03:21 (1941-12-08UTC03:21Z)
下面的示例演示了儒略曆日期的使用。顯示1672年6月9日 (1672-06-09),並生成隱藏的微格式日期:1672-06-09
{{start-date|9 June 1672|{{OldStyleDate|9 June|1672|30 May}}}} → 1672年6月9日 (1672-06-09)
{{birth-date|9 June 1672|{{OldStyleDate|9 June|1672|30 May}}}} → 1672年6月9日 (1672-06-09)
{{end-date|9 June 1672|{{OldStyleDate|9 June|1672|30 May}}}}   → 1672年6月9日 (1672-06-10)
{{death-date|9 June 1672|{{OldStyleDate|9 June|1672|30 May}}}}   → 1672年6月9日 (1672-06-10)

微格式輸出

編輯

Start date模板:

  • {{Start-date|31 December 2016}} → 2016年12月31日 (2016-12-31)
    2016年12月31日<span style="display:none">&#160;(<span class="dtstart ">2016-12-31</span>)</span>
  • {{Start date|2016|12|31|df=y}} → 2016年12月31日 (2016-12-31)
    2016年12月31日<span style="display:none">&#160;(<span class="bday dtstart published updated">2016-12-31</span>)</span>

Birth date模板:

  • {{Birth-date|31 December 2016}} → 2016年12月31日 (2016-12-31)
    2016年12月31日<span style="display:none">&#160;(<span class="dtstart bday">2016-12-31</span>)</span>
  • {{Birth date|2016|12|31|df=y}}(2016-12-31)2016年12月31日
    <span style="display:none">(<span class="bday">2016-12-31</span>)</span>2016年12月31日

End date模板:

  • {{End-date|31 December 2016}} → 2016年12月31日 (2017-01-01)
    2016年12月31日<span style="display:none">&#160;(<span class="dtend ">2017-01-01</span>)</span>
  • {{End date|2016|12|31|df=y}} → 2016年12月31日 (2016-12-31)
    2016年12月31日<span style="display:none">&#160;(<span class="dtend">2016-12-31</span>)</span>

Death date模板:

  • {{Death-date|31 December 2016}} → 2016年12月31日 (2017-01-01)
    2016年12月31日<span style="display:none">&#160;(<span class="dtend ">2017-01-01</span>)</span>
  • {{Death date|2016|12|31|df=y}} → 2016年12月31日2016-12-31
    2016年12月31日<span style="display:none">(<span class="dday deathdate">2016-12-31</span>)</span>

參數

編輯
匿名參數1
(必填)日期和時間,用於顯示和輸出微格式。如果沒有年份,則假定為當前年份。如果缺少日,則假定為每月1日。如果缺少小時或分鐘,則假定為零。如果缺少時區或地點,則假定為條目中討論事件的當地時間。如果需要UTC時間,請參閱timezone參數的說明。編者可指定地名(見列表)或時區,如EDT、PST、HST等,這些時區將被適當調整為UTC(協調世界時),以便通過微格式編碼傳送到其他應用程序。需要公曆日期。使用匿名參數2可以顯示公曆或農曆日期。
ISO8601
(可選)填寫後則將發送該ISO8601日期/時間值,而不是匿名參數1得出的值。
BCE
(公元前日期必填),如果日期為公元前,則設置為yes。
timezone
tz
(如果指定了時區信息,則必填)如果時間為UTC或者指定了位置、時區或時區偏移量,則設置為yes。

模板數據

編輯
以下是該模板的模板資料,適用於視覺化編輯器等工具。

Start-date模板資料

沒有描述。

模板參數[編輯模板資料]

參數描述類型狀態
11

沒有描述

不明非必填
22

沒有描述

不明非必填
ISO8601ISO8601

沒有描述

不明非必填
dtdt

沒有描述

不明非必填
tztz

set to "yes" when timezone is present, or when timzone UTC is implicit

布林值非必填
timezonetimezone

沒有描述

不明非必填
BCEBCE

沒有描述

不明非必填
BCBC

沒有描述

不明非必填
displaydisplay

沒有描述

不明非必填
class-extraclass-extra

沒有描述

不明非必填
dfdf

沒有描述

不明非必填

模糊的時間和日期

編輯

For the years 99 BC to 99AD especially, microformats may not be emitted properly unless expressed in the form YYYY-MM-DD. For users uninterested in microformats, it should be noted that this restriction has no known impacts other than microformat data which are currently invisible to users. The user of course may express the display form in the second parameter however they would like. Example: 1-2-3 is interpreted as February 3, 1 A.D, and emitted in that form via microformats when the user may have intended something else. Other 3 digit years may be misinterpreted as well, so best practice is to use leading zeros to make a 4 digit year for this date range. For example, February 274 will be interpreted as February 27, 2004. Instead, use "February 0274". Background: There is a good rationale for the behavior of the system function which actually does the hard work of this template. It is very unusual for people to mention such dates so long ago, so when we really mean this date, we must specify a 4 digit date. Outside of this period with ambiguous years, users may use free text dates without this restriction. Bot runs may make a conversion of non 4 digit years to 4 digits (with leading zeros) in order to refine Wikipedia's quality of microformat dates. These changes will not affect display, but for those curious, this is the rationale for such bot manipulations.

時區

編輯

可識別大多數時區縮寫和大量地名。(請參見可識別的時區表)。

{{start-date|December 7, 1941 8:43AM Pacific/Honolulu }}1941年12月7日 19:13 (1941-12-07UTC19:13)
{{start-date|December 8, 1941 12:30PM Asia/Manila }}1941年12月8日 04:30 (1941-12-08UTC04:30)

參見

編輯