Template:Birth based on age as of date
跳到导航
跳到搜索
![]() | 本Template的源代码中包含了一些精密的可選參數和構造。 建議您於編輯模板前先熟悉其构造與解析器函數。若您的編輯導致了意外的問題,請儘快撤銷編輯,因該模板或於相當數量的頁面中出現。 所有實驗性的编辑可於沙盒模板或者您自己的用戶頁中進行。 |
Usage[编辑]
This template calculates the birth year and current age based on the age as of a date. This is useful when a reference states only their age at the time of the reference's publication.
Syntax[编辑]
{{Birth based on age as of date|age|year|month|day}}
The age, year, and day must be supplied as natural numbers; month can be specified as a natural number as well as by name or abbreviation (e.g. "August" or "Aug"). The Gregorian calendar is assumed, with no special support provided for dual dating or the difference between Old Style and New Style dates .
Examples[编辑]
For example, if a reference dated July 4, 2022 mentions that someone is 50 years old, that person's birth year and age can be rendered using
{{Birth based on age as of date|50|2022|July|4}}
Template text | Result |
---|---|
{{Birth based on age as of date|50|2022|3|22}} | 1971/1972年(51岁) |
{{Birth based on age as of date|50|2022|3月|22}} | 1971/1972年(51岁) |
{{Birth based on age as of date|50|2022|1|15}} | 1971/1972年(51–52岁) |
{{Birth based on age as of date|50|2022|Nov|5}} | 1971/1972年(50–51岁) |
參見[编辑]
|
上述文档嵌入自Template:Birth based on age as of date/doc。 (编辑 | 历史) 编者可以在本模板的沙盒 (创建 | 镜像)和测试样例 (创建)页面进行实验。 请在/doc子页面中添加分类。本模板的子页面。 |