模板:Death date and age:修订间差异
外观
建立内容为“<includeonly>{{{1|{{{year}}}}}}年{{#if:{{{df|}}}|{{MONTHNAME|{{{2|{{{month}}}}}}}}{{#expr:{{{3|{{{day}}}}}}}}日|{{MONTHNAME|{{{2|{{{month}}}}}}}}{{#expr:{{{3|{{…”的新页面 |
小无编辑摘要 |
||
| 第1行: | 第1行: | ||
<includeonly>{{{1|{{{year}}}}}}年{{#if:{{{df|}}}|{{MONTHNAME|{{{2|{{{month}}}}}}}}{{#expr:{{{3|{{{day}}}}}}}}日|{{MONTHNAME|{{{2|{{{month}}}}}}}}{{#expr:{{{3|{{{day}}}}}}}}日}}<span style="display:none">(<span class="dday deathdate">{{{1}}} | <includeonly>{{{1|{{{year}}}}}}年{{#if:{{{df|}}}|{{MONTHNAME|{{{2|{{{month}}}}}}}}{{#expr:{{{3|{{{day}}}}}}}}日|{{MONTHNAME|{{{2|{{{month}}}}}}}}{{#expr:{{{3|{{{day}}}}}}}}日}}<span style="display:none">(<span class="dday deathdate">{{{1}}}岁-{{padleft:{{MONTHNUMBER|{{{2}}}}}|2|0}}-{{padleft:{{{3}}}|2|0}}</span>)</span>({{#if:{{{5|}}} | ||
|{{#if:{{{6|}}} | |{{#if:{{{6|}}} | ||
|<!-- if all birth values are specified -->{{age|{{{4}}}|{{{5}}}|{{{6}}}|{{{1|{{{year}}}}}}|{{{2|{{{month}}}}}}|{{{3|{{{day}}}}}}}} | |<!-- if all birth values are specified -->{{age|{{{4}}}|{{{5}}}|{{{6}}}|{{{1|{{{year}}}}}}|{{{2|{{{month}}}}}}|{{{3|{{{day}}}}}}}} | ||
| 第10行: | 第10行: | ||
}} | }} | ||
}} | }} | ||
|{{Age in years|{{{4}}}|{{{1|{{{year}}}}}}}}}} | |{{Age in years|{{{4}}}|{{{1|{{{year}}}}}}}}}}岁)</includeonly><noinclude> | ||
{{documentation|Template:Death date and age/doc}} | {{documentation|Template:Death date and age/doc}} | ||
</noinclude> | </noinclude> | ||
2021年6月19日 (六) 03:13的最新版本
使用说明
本模板将能自动显示某人死亡时的年龄。
使用这个模板能够将关于死亡日期隐藏的元数据(metadata)包含在条目内。某些浏览器和其他的软件将能够解析这些元数据,并能够将这些数据用在其他的网站,或是索引工具上,让使用者能方便搜寻。
- 代码:
{{Death date and age|死亡年|死亡月|死亡日|出生年|出生月|出生日}}
- 格式:
{{Death date and age|yyyy|mm|dd|yyyy|mm|dd}}- 范例:
{{Death date and age|1993|2|24|1921|4|12}}
返回:
1993年2月24日(71岁){{Death date and age|1993|2|24|1921|4}}
返回:
1993年2月24日(71岁){{Death date and age|1993|2|24|1921}}
返回:
1993年2月24日(71-72岁)
- 注意:
- 若有参数为空白,本模板将会出现错误的显示(请见其上方说明)。
重定向
- {{Dda}}、{{Deathdateandage}}和{{死亡年月日と没年齢}}重定向至{{Death date and age}}。
参见
- {{Birth date and age}},类似的模板,适合在世人物使用,将显示目前的年龄。
- {{bd}},用于显示人物的生卒日期。