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

用法

本模版((Birth year and age))和((Death year and age))顯示一個人的出生或逝世年份與大概年齡。如果要完整顯示出生或逝世年月日,請使用((Birth date and age))和((Death date and age))。

本頁說明全部範例所使用的今天日期是 2024年8月1日

((Birth year and age))

假設:

  1. 某人的出生年份是1969年
  2. 今天是2024年8月1日
所以使用本模版((birth year and age|1969))時,
他的出生年份與年齡是:1969年(54—55歲)
假設這個人出生的年月份是1969年6月,那麼:
  • 如果現在是2024年1月,即是說這個人今年還沒有過生日。所以使用本模版((birth year and age|1969|6)) 時,他的出生年月份與年齡是:1969年6月(54歲)。
  • 如果現在是2024年6月,我們並不知道他是否過了生日(因為我們不知道他哪一天出生)。所以本模版就會顯示他的出生年份與年齡是:1969年6月(54-55歲)。
  • 如果現在是2024年12月,即是說這個人今年已經過了生日。所以使用本模版時,他的出生年份與年齡是:1969年6月(55歲)。

((Death year and age))

假設:

  1. 某人的出生年份是1973年
  2. 他於2023年某日逝世
所以使用本模版((Death year and age|2023|1973))時,
他的逝世年份與年齡是:2023年(49—50歲)
使用上述例子,假設這個人的逝世月份是08(8月)
所以使用本模版((Death year and age|2023|1973|08))時,
他的逝世年份與年齡是:2023年8月(49—50歲)

Note: Do not use this template inside the Wikipedia:Persondata template as it can interfere with data extraction.

格式

((Birth year and age|出生年份))
((Birth year and age|出生年份|出生月份(可省略)))
((Death year and age|逝世年份|出生年份))
((Death year and age|逝世年份|出生年份|逝世月份(可省略)))

範例

原始碼 結果
((Birth year and age|1969)) 1969年(54—55歲)
((Birth year and age|1969|08)) 1969年8月(54—55歲)
((Death year and age|2023|1973)) 2023年(49—50歲)
((Death year and age|2023|1973|08)) 2023年8月(49—50歲)

參見

显示出生日期,并在其后自动计算并加注今年的年龄。

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

参数描述类型状态
出生年份year

请填写四位数的阿拉伯数字,不须加上“年”

示例值
1970
数字必需
出生月份month

请填写阿拉伯数字,不须加上“月”

数字推荐
出生日day

请填写阿拉伯数字,不须加上“日”

数字推荐