Template:Age: Difference between revisions

    From Nonbinary Wiki
    m (unnecessary ifs)
    m (documentation and sort in categories)
    Line 1: Line 1:
    <includeonly>{{#expr:
    <includeonly>{{#expr:({{{4|{{CURRENTYEAR}}}}})-({{{1}}})-(({{{5|{{CURRENTMONTH}}}}})<({{{2}}})or({{{5|{{CURRENTMONTH}}}}})=({{{2}}})and({{{6|{{CURRENTDAY}}}}})<({{{3}}}))}}</includeonly><noinclude>{{Template documentation}}
    ({{{4|{{CURRENTYEAR}}}}}) - ({{{1}}}) -
    (({{{5|{{CURRENTMONTH}}}}}) < ({{{2}}}) or
    ({{{5|{{CURRENTMONTH}}}}}) = ({{{2}}}) and
    ({{{6|{{CURRENTDAY}}}}})   < ({{{3}}})
    )}}</includeonly><noinclude>


    For usage instructions, see [[Template talk:Age|the talk page]].
    This template returns the number of full years elapsed at one date since another date or since today (UTC time as set on the Wikipedia server).


    [[Category:Date math]]
    ; Syntax<nowiki>:</nowiki>
    : <tt><nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|</nowiki></tt>''year1''<tt><nowiki>|</nowiki></tt>''month1''<tt><nowiki>|</nowiki></tt>''day1''<tt><nowiki>|</nowiki></tt>''year2''<tt><nowiki>|</nowiki></tt>''month2''<tt><nowiki>|</nowiki></tt>''day2''<tt><nowiki>}}</nowiki></tt>
    : <tt><nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|</nowiki></tt>''year1''<tt><nowiki>|</nowiki></tt>''month1''<tt><nowiki>|</nowiki></tt>''day1''<tt><nowiki>}}</nowiki></tt>
     
    [[Category:Date math|{{PAGENAME}}]]
    [[Category:Templates using ParserFunctions|{{PAGENAME}}]]
    </noinclude>
    </noinclude>

    Revision as of 15:44, 5 May 2006

    Template:Template documentation

    This template returns the number of full years elapsed at one date since another date or since today (UTC time as set on the Wikipedia server).

    Syntax:
    {{Age|year1|month1|day1|year2|month2|day2}}
    {{Age|year1|month1|day1}}