更改

跳转至: 导航搜索

模板:Age

添加1,860字节2019年8月9日 (五) 23:03
无编辑摘要
{{#invoke:age|age_generic|template=age_full_years}}<noinclude>== Usage == This template returns the number of full years between two specified dates. If the second set of parameters is not included, it returns the number of full years between a specified date and today's date. Dates are checked for validity. For example, 29 February 2000 is accepted, but 29 February 1900 is not a valid date. Partial dates such as July 1989 (no day) or 1989 (no month and no day) can be entered using <code>0</code> for missing values. Having no year, or having a day with no month is an error. ; Syntax:: <code><nowiki>{{</nowiki>age|''year''|''month''|''day''|''year2''|''month2''|''day2''}}</code> or: <code><nowiki>{{</nowiki>age|''year''|''month''|''day''}}</code> or: <code><nowiki>{{</nowiki>age|''date''|''date2''}}</code> or: <code><nowiki>{{</nowiki>age|''date''}}</code> ; Examples:: <code><nowiki>{{</nowiki>age|1989|7|23|2003|7|14}}</code> → {{age|1989|7|23|2003|7|14}}: <code><nowiki>{{</nowiki>age|1989|7|0|2003|7|14}}</code> → {{age|1989|7|0|2003|7|14}}: <code><nowiki>{{</nowiki>age|1989|0|0|2003|7|14}}</code> → {{age|1989|0|0|2003|7|14}}: <code><nowiki>{{</nowiki>age|1989|7|23}}</code> → {{age|1989|7|23}}: <code><nowiki>{{</nowiki>age|23 July 1989|14 July 2003}}</code> → {{age|23 July 1989|14 July 2003}}: <code><nowiki>{{</nowiki>age|July 1989|2003}}</code> → {{age|July 1989|2003}} : When entering dates before the [[Common Era]], use astronomical year numbering: 1&nbsp;BCE is represented by <code>0</code>, 2&nbsp;BCE by <code>-1</code>, 3&nbsp;BCE by <code>-2</code> etc. For example, the following gives the number of full years since the battle of Cannae, which took place on August 2, 216 BCE::: <code><nowiki>{{</nowiki>age|-215|8|2}}</code> → {{age|-215|8|2}}:: <code><nowiki>{{</nowiki>age|August 2, 216 BCE}}</code> → {{age|August 2, 216 BCE}}</noinclude>
3,425
个编辑

导航菜单