Template:End date
外观
package.lua第80行Lua错误:module 'Module:Transclusion_count/data/E' not found
模板{{Start date}}及{{End date}}會傳回一個日期值,又或日期與時間的值。這個值傳回的同時,還附帶一個隱藏的ISO日期格式(以CSS實現),以供微格式使用。當用戶端不能使用CSS時,這個隱藏的日期會自動降格。
何時不應使用這一模板?
[编辑]Do not use this template for:
- dates that are uncertain e.g. "before 4 April 1933"; "around 18 November 1939".
- dates outside the range given under "Limitation", below.
- other, secondary dates
- outside microformat-emitting templates - if in doubt, see the parent template's documentation
- more than one date in any parent template
用法
[编辑]{{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年"{{start date|1993|02}}→ "1993年2月"{{start date|1993|02|24}}→ "1993年2月24日"{{start date|1993|02|24|08|30}}→ "1993年2月24日 08:30"{{start date|1993|02|24|08|||+01:00}}→ "1993年2月24日 (+01:00)"{{start date|1993|02|24|08|||-07:00}}→ "1993年2月24日 (-07:00)"{{start date|1993|02|24|08|30|23}}→ "1993年2月24日 08:30:23"{{start date|1993|02|24|08|30|23|Z}}→ "1993年2月24日 08:30:23 (UTC)"{{start date|1993|02|24|08|30|23|+01:00}}→ "1993年2月24日 08:30:23 (+01:00)"{{start date|1993|02|24|08|30|23|-07:00}}→ "1993年2月24日 08:30:23 (-07:00)"
原來的英文版有 df 選項,當這選項被設定時,會強制日期以歐洲式(即 日/月/年 ,而非北美式的 月/日/年)顯示。這個選項在中文版無效。例如:
- {{Start date|1993|02|24|08|30|df=yes}} 仍然顯示為 年/月/日: "1993年2月24日 08:30"
注意:
如果year参数留空的话,即使後面有填入month、day參數也不會顯示:
- {{Start date| |02|24}} 返回 ""(空白)
如果有year、day參數無month參數,只顯示年份,其它情況如此類推:
- {{Start date|1993| |24}} 返回 "1993年"
Parameters
[编辑]Date that an event or entity started or was created
| 参数 | 描述 | 类型 | 状态 | |
|---|---|---|---|---|
| YYYY | 1 | start year | 数字 | 可选 |
| MM | 2 | start month | 数字 | 可选 |
| DD | 3 | start day of month | 数字 | 可选 |
| HH | 4 | start hours | 数字 | 可选 |
| MM | 5 | start minutes
| 数字 | 可选 |
| SS | 6 | start seconds
| 数字 | 可选 |
| TZ | 7 | time zone offset, “+02:00”, “-06:00” or “Z” for UTC | 单行文本 | 可选 |
| day first | df | boolean parameter to put the date before the month name
| 单行文本 | 可选 |
中文维基暂无该微格式模板。
详情请看 微格式专题。
參看
[编辑]- {{End date}}
- {{Start date and age}}
- {{Start-date}}(和此模板功能類似)
| 上述文档嵌入自Template:Start date/doc。 (编辑 | 历史) 编者可以在本模板的沙盒 (创建 | 镜像)和测试样例 (创建)页面进行实验。 本模板的子页面。 |