For faster navigation, this Iframe is preloading the Wikiwand page for Template:End date.

Template:End date

文档图示 模板文档[查看] [编辑] [历史] [清除缓存]

模板((Start date))((End date))會傳回一個日期值,又或日期與時間的值。這個值傳回的同時,還附帶一個隱藏的ISO日期格式(以CSS實現),以供微格式使用。當用戶端不能使用CSS時,這個隱藏的日期會自動降格。

何時不應使用這一模板?

請勿將此模板用於以下用途:

  • 不確定的日期,例如「1933年4月4日前」、「大約1939年11月18日」。
  • 不在限制範圍內的日期。
  • 其他或次要的日期。
  • 不在微格式發出模板內的日期——若有疑問,請參閱上層模板文件。
  • 在任何上層模板中多於一個日期。

用法

  • ((start date|year|month|day))
  • ((start date|year|month|day|HH|MM|SS|TimeZone)) (MM and SS are optional; TimeZone may be a numerical value, or "Z" for UTC; see examples)
例子:
  • ((start date|1993)) → "1993年 (1993)"
  • ((start date|1993|02)) → "1993年2月 (1993-02)"
  • ((start date|1993|02|24)) → "1993年2月24日 (1993-02-24)"
  • ((start date|1993|02|24|08|30)) → "1993年2月24日 08:30 (1993-02-24T08:30)"
  • ((start date|1993|02|24|08|||+01:00)) → "1993年2月24日 (+01:00) (1993-02-24T08+01:00)"
  • ((start date|1993|02|24|08|||-07:00)) → "1993年2月24日 (-07:00) (1993-02-24T08-07:00)"
  • ((start date|1993|02|24|08|30|23)) → "1993年2月24日 08:30:23 (1993-02-24T08:30:23)"
  • ((start date|1993|02|24|08|30|23|Z)) → "1993年2月24日 08:30:23 (UTC) (1993-02-24T08:30:23Z)"
  • ((start date|1993|02|24|08|30|23|+01:00)) → "1993年2月24日 08:30:23 (+01:00) (1993-02-24T08:30:23+01:00)"
  • ((start date|1993|02|24|08|30|23|-07:00)) → "1993年2月24日 08:30:23 (-07:00) (1993-02-24T08:30:23-07:00)"

原來的英文版有 df 選項,當這選項被設定時,會強制日期以歐洲式(即 日/月/年 ,而非北美式的 月/日/年)顯示。這個選項在中文版無效。例如:

  • ((Start date|1993|02|24|08|30|df=yes)) 仍然顯示為 年/月/日: "1993年2月24日 08:30 (1993-02-24T08:30)"

注意:

如果year参数留空的话,即使後面有填入month、day參數也不會顯示:

  • ((Start date| |02|24)) 返回 " ()"(空白)

如果有year、day參數無month參數,只顯示年份,其它情況如此類推:

  • ((Start date|1993| |24)) 返回 "1993年 (1993)"

參數

以下是该模板的模板数据,适用于可视化编辑器等工具。

End date模板数据

Date that an event or entity started or was created

模板参数[编辑模板数据]

参数描述类型状态
YYYY1

開始的年份

数字可选
MM2

開始的月份

数字可选
DD3

開始的日期

数字可选
HH4

開始的小時數

数字可选
MM5

開始的分鐘數

默认值
0
数字可选
SS6

開始的秒鐘數

默认值
0
数字可选
TZ7

時區位移,「+02:00」、「-06:00」或用「Z」表示UTC

单行文本可选
day firstdf

Boolean參數,用以將日期置於月份前

默认值
false
单行文本可选

使用微格式

中文维基暂无该微格式模板。

详情请看 微格式专题

參看

{{bottomLinkPreText}} {{bottomLinkText}}
Template:End date
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?