模板: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。 (编辑 | 历史) 编者可以在本模板的沙盒 (创建 | 镜像)和测试样例 (创建)页面进行实验。 本模板的子页面。 |