Template:Age in years/doc: Difference between revisions
Appearance
w>PrimeHunter →Usage: Add more examples to demonstrate when a range is given. The template provides an age range if a year and not a full date is given |
m 1 revision imported |
||
(No difference)
| |||
Latest revision as of 13:41, 19 January 2026
| icon | This is a documentation subpage for Template:Terminate sentence It may contain usage information, categories and other content that is not part of the original template page. |
| Warning | This template is used on approximately 4,100 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
| File:Lua-Logo.svg | This template uses Lua: |
Usage
{{Age in years|2000}} yields 25–26.
{{Age in years|2000|2015}} yields 14–15.
{{Age in years|2000-06-01|2015-06-01}} yields 15.
{{Age in years|2000-06-02|2015-06-01}} yields 14.
{{Age in years|2000-01-01}} yields 26.
{{Age in years|2000-12-31}} yields 25.
Note that the template provides an age range if a year and not a full date is given: during the year 2015, someone born in 2000 is either 14 or 15 years old, depending on whether they have passed their birth date in the later year. If no end date is given then the current date is used.
See also