第1行: |
第1行: |
− | [[{{{1|{{{year|{{{1}}}}}}}}}年]][[{{{2|{{{month|{{{1}}}}}}}}} 月{{{3|{{{day|{{{3}}}}}}}}} 日]]({{age | {{{1|{{{year|{{{1}}}}}}}}} | {{{2|{{{month|{{{2}}}}}}}}} | {{{3|{{{day|{{{3}}}}}}}}} }} 歲)<noinclude>
| + | <includeonly><span style="display:none"> (<span class="bday">{{{1|{{{year}}}}}}-{{padleft:{{{2|{{{month}}}}}}|2|0}}-{{padleft:{{{3|{{{day}}}}}}|2|0}}</span>) </span>{{{1|{{{year}}}}}} 年{{#if:{{{df|}}}|{{MONTHNAME|{{{2|{{{month}}}}}}}}{{#expr:{{{3|{{{day}}}}}}}} 日|{{MONTHNAME|{{{2|{{{month}}}}}}}}{{#expr:{{{3|{{{day}}}}}}}} 日}}<span class="noprint ForceAgeToShow"> ({{age | {{{1|{{{year}}}}}} | {{{2|{{{month}}}}}} | {{{3|{{{day}}}}}} }}歲)</span></includeonly><noinclude> |
− | | + | {{documentation|Template:Birth date and age/doc}} |
− | === 功能 ===
| |
− | 本模板將會顯示出生日期,並在其後自動計算並加註今年的年齡。
| |
− | | |
− | === 使用說明 ===
| |
− | 請使用以下原始碼:
| |
− | | |
− | <code> {{Birth_date_and_age|year=|month=|day=}} </code>
| |
− | | |
− | === 填寫說明 ===
| |
− | * '''year''':出生西元年份(請填寫四位數的阿拉伯數字,不須加上「年」)
| |
− | * '''month''':出生月份(請填寫阿拉伯數字,不須加上「月」)
| |
− | * '''day''':出生日(請填寫阿拉伯數字,不須加上「日」)
| |
− | | |
− | === 範例 ===
| |
− | <code>{{Birth_date_and_age|year=1985|month=7|day=28}}</code>
| |
− | {{Birth_date_and_age|year=1985|month=7|day=28}} | |
− | | |
− | 也可以省略變數名稱,例如:
| |
− | <code>{{Birth_date_and_age|1985|7|28}}</code> | |
− | {{Birth_date_and_age|1985|7|28}} | |
− | | |
− | [[Category: 日期计算模板|{{PAGENAME}}]]
| |
| </noinclude> | | </noinclude> |