Changes

Jump to navigation Jump to search
extra
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata -->
{{Lua|Module:Age}}

This template returns the number of years that have elapsed between two dates.

A hidden sort key is included so values produced by this template will work properly in [[Help:Sorting|sortable tables]]. The sort key is calculated from the number of days between the given dates, and is compatible with {{tl|number table sorting}}.

== Usage ==
<kbd><nowiki>{{Age in years nts|2000}}</nowiki></kbd> yields {{Age in years nts|2000}}.
<kbd><nowiki>{{Age in years nts|1900|1950}}</nowiki></kbd> yields {{Age in years nts|1900|1950}}.

Note that the template can provide an age range: 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.

{{Birth, death and age templates|age}}

<includeonly>{{sandbox other||
<!-- Categories below this line and interwikis at Wikidata -->
[[Category:Date mathematics templates|{{PAGENAME}}]]

}}</includeonly>
Anonymous user

Navigation menu