模板:Birth date and age
| 警告 | 此模板被引用于89,000+个页面,占全部页面的2%。 为了避免造成大规模的影响,所有对此模板的编辑应先于沙盒、测试样例或您的沙盒上测试。 测试后无误的版本可以一次性地加入此模板中,但是修改前请务必于讨论页发起讨论。 模板引用数量会自动更新。 |
使用模板{{Birth date and age}}将会显示出生日期,并在其后自动计算并加注今年的年龄。{{Birth date}}是一个用法相似的模板,但不会加注年龄。
如果知道出生日,但只欲显示出生年份,请使用{{Birth year and age confirmed}}。如果不知道出生日,只知道出生年份(含月份),请使用{{Birth year and age}}。
使用说明[编辑]
请使用以下源代码:
{{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}}
页面上显示为:
1993年2月24日
例2,也可以省略变数名称,例如:
{{Birth date and age|1993|2|24}}
页面上显示为:
1993年2月24日
例3,若使用:
{{Birth date|1993|02|24}}
则页面上显示为:
1993年2月24日
重定向[编辑]
{{生日和年龄}}重定向至{{Birth date and age}}。
参见[编辑]
- {{Death date and age}},用于显示某人去世日期与年龄。
- {{Start date and age}},传回日期和它距离今天的时间长度。
<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": "显示出生日期,并在其后自动计算并加注今年的年龄。如果知道出生日,但只欲显示出生年份,请使用{{{year}}}年。如果不知道出生日,只知道出生年份,请使用未指定年份。", "maps": { "生日和年龄": {}, "生日和年龄 ": {} }, "paramOrder": [ "year", "month", "day" ], "format": "inline" } </templatedata>