Changes

Jump to navigation Jump to search
{{Template shortcut|A.y}}
{{Documentation subpage}}
{{Template shortcut|A.y}}
== Usage ==
Displays age in years and fractions of years. Dates can be entered in the format:

{{tlx|A.y|''Start year''|''Start month''|''Start day''|''End year''|''End month''|''End day''}}

or

{{tlx|A.y|''Start date''|''End date''}}

The {{para|round}} parameter can be used to set the number of decimal places shown (defaults to 1).

The {{para|suffix}} parameter can be used to set the suffix after the number (defaults to "years").

== Examples ==

*<code><nowiki>{{a.y|15 May 2010}}</nowiki></code> → {{a.y|15 May 2010}}
*<code><nowiki>{{a.y|12 Aug 2003|24 Sep 2011}}</nowiki></code> → {{a.y|12 Aug 2003|24 Sep 2011}}
*<code><nowiki>{{a.y|1989|7|23}}</nowiki></code> → {{a.y|1989|7|23}}
*<code><nowiki>{{a.y|1989|7|23|2003|7|24}}</nowiki></code> → {{a.y|1989|7|23|2003|7|24}}
*<code><nowiki>{{a.y|1989|7|23|2003|7|24|round=3}}</nowiki></code> → {{a.y|1989|7|23|2003|7|24|round=3}}
*<code><nowiki>{{a.y|2007|03|02|2008|03|02|suffix=yr}}</nowiki></code> → {{a.y|2007|03|02|2008|03|02|suffix=yr}}

== See also ==
{{Birth, death and age templates}}
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Date mathematics templates]]
}}</includeonly>
Anonymous user

Navigation menu