模板:Birth date and age/doc

出自Local Chinese Wikipedia
跳至導覽 跳至搜尋

腳本錯誤:沒有「Message box」這個模塊。 使用模板{{Birth date and age}}將會顯示出生日期,並在其後自動計算並加註今年的年齡。{{Birth date}}是一個用法相似的模板,但不會加注年齡。

如果知道出生日,但只欲顯示出生年份,請使用{{Birth year and age confirmed}}。如果不知道出生日,只知道出生年份(含月份),請使用{{Birth year and age}}。

使用說明[編輯]

本頁說明全部範例所使用的今天日期是

2026年7月9日

請使用以下原始碼:

{{Birth date|year=|month=|day=}}
{{Birth date and age|year=|month=|day=}}

其中:

  • year:出生西元年份(請填寫四位數的阿拉伯數字,不須加上「年」)
  • month:出生月份(請填寫阿拉伯數字,不須加上「月」)
  • day:出生日(請填寫阿拉伯數字,不須加上「日」)

範例[編輯]

例1,使用:

{{Birth date and age|year=1993|month=2|day=24}}

頁面上顯示為:

Template:Birth date and age

例2,也可以省略變數名稱,例如:

{{Birth date and age|1993|2|24}}

頁面上顯示為:

Template:Birth date and age

例3,若使用:

{{Birth date|1993|02|24}}

則頁面上顯示為:

Template:Birth date

重定向[編輯]

{{生日和年齡}}重定向至{{Birth date and age}}。

參見[編輯]

Template:出生、逝世及日期模板


<templatedata> { "params": { "year": { "label": "出生年份", "description": "請填寫四位數的阿拉伯數字,不須加上「年」", "type": "number", "required": true, "aliases": [ "1" ] }, "day": { "label": "出生日", "description": "請填寫阿拉伯數字,不須加上「日」", "type": "number", "suggested": true, "aliases": [ "3" ] }, "month": { "label": "出生月份", "description": "請填寫阿拉伯數字,不須加上「月」", "type": "number", "suggested": true, "aliases": [ "2" ] } }, "description": "顯示出生日期,並在其後自動計算並加注今年的年齡。如果知道出生日,但只欲顯示出生年份,請使用Template:Birth year and age confirmed。如果不知道出生日,只知道出生年份,請使用腳本錯誤:沒有「Error」這個模塊。。", "maps": { "生日和年齡": {}, "生日和年齡 ": {} }, "paramOrder": [ "year", "month", "day" ], "format": "inline" } </templatedata>