Template:Start date/doc

模板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

用法

 * (MM and SS are optional; TimeZone may be a numerical value, or "Z" for UTC; see examples)
 * (MM and SS are optional; TimeZone may be a numerical value, or "Z" for UTC; see examples)


 * 例子：
 * → "1993"
 * → "February 1993"
 * → "February 24, 1993"
 * → "08:30, February 24, 1993"
 * → "February 24, 1993 (+01:00)"
 * → "February 24, 1993 (-07:00)"
 * → "08:30:23, February 24, 1993"
 * → "08:30:23, February 24, 1993 (UTC)"
 * → "08:30:23, February 24, 1993 (+01:00)"
 * → "08:30:23, February 24, 1993 (-07:00)"

原來的英文版有 df 選項，當這選項被設定時，會強制日期以歐洲式（即 日/月/年 ，而非北美式的 月/日/年）顯示. '''這個選項在中文版無效. '''例如：
 * 08:30, February 24, 1993 仍然顯示為 年/月/日： "08:30, February 24, 1993"

注意：

如果year参数留空的话，即使後面有填入month、day參數也不會顯示：
 * February 24, undefined 返回 "February 24, undefined"（空白）

如果有year、day參數無month參數，只顯示年份，其它情況如此類推：
 * 1993 返回 "1993"

Parameters
{ "description": "Date that an event or entity started or was created", "params": { "1": {"label": "YYYY", "description": "start year", "type": "number"}, "2": {"label": "MM", "description": "start month", "inherits": "1"}, "3": {"label": "DD", "description": "start day of month", "inherits": "1"}, "4": {"label": "HH", "description": "start hours", "inherits": "1"}, "5": {"label": "MM", "description": "start minutes", "inherits": "1", "default": "0"}, "6": {"label": "SS", "description": "start seconds", "inherits": "5"}, "7": {"label": "TZ", "description": "time zone offset, “+02:00”, “-06:00” or “Z” for UTC", "inherits": "1", "type": "string/line"}, "df": {"label": "day first", "description": "boolean parameter to put the date before the month name", "default": "false", "type": "string/line"} }}

使用微格式
中文维基暂无该微格式模板.

详情请看 微格式专题.

參看

 * End date
 * Start date and age
 * Start-date（和此模板功能類似）