Template:AgeAN: Difference between revisions
From MicrasWiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{{#if:{{{2|}}}|{{#expr:{{{2}}}-{{{1}}}}}|{{#expr:{{Current AN|noAN=y}}-{{{1|}}}}}}}{{#if:{{{noAN|}}}|| [[Anno Nortone|AN]] year{{# | <includeonly>{{#if:{{{2|}}}|{{#expr:{{{2}}}-{{{1}}}}}|{{#expr:{{Current AN|noAN=y}}-{{{1|}}}}}}}{{#if:{{{noAN|}}}|| [[Anno Nortone|AN]] year{{#ifeq:{{#expr:{{Current AN|noAN=y}}-{{{1}}}}}|1||s}}}}</includeonly><noinclude> | ||
==Usage== | ==Usage== | ||
# <code><nowiki>{{AgeAN|1666}}</nowiki></code>, to display the age of a character born in {{AN|1666}}, {{AgeAN|1666}}. | # <code><nowiki>{{AgeAN|1666}}</nowiki></code>, to display the age of a character born in {{AN|1666}}, {{AgeAN|1666}}. | ||
# <code><nowiki>{{AgeAN|1587|1666}}</nowiki></code>, to display the age of a character born in {{AN|1587}} who died in {{AN|1666}}, {{AgeAN|1587|1666}}. | # <code><nowiki>{{AgeAN|1587|1666}}</nowiki></code>, to display the age of a character born in {{AN|1587}} who died in {{AN|1666}}, {{AgeAN|1587|1666}}. | ||
# <code><nowiki>{{AgeAN|1587|noAN=y}}</nowiki></code>, to display the age of a character born in {{AN|1587}} as a number only, {{AgeAN|1587|noAN=y}}. | # <code><nowiki>{{AgeAN|1587|noAN=y}}</nowiki></code>, to display the age of a character born in {{AN|1587}} as a number only, {{AgeAN|1587|noAN=y}}. | ||
# <code><nowiki>{{AgeAN|{{#expr:{{Current AN|noAN=y}}-1}}}} | # <code><nowiki>{{AgeAN|</nowiki>{{#expr:{{Current AN|noAN=y}}-1}}}}</code>, drops the s for a character that is 1 year old, {{AgeAN|{{#expr:{{Current AN|noAN=y}}-1}}}}. | ||
[[Category:MicrasWiki]]</noinclude> | [[Category:MicrasWiki]]</noinclude> |
Revision as of 14:42, 3 July 2020
Usage
{{AgeAN|1666}}
, to display the age of a character born in 1666 AN, Expression error: Unrecognized punctuation character "[". AN years.{{AgeAN|1587|1666}}
, to display the age of a character born in 1587 AN who died in 1666 AN, 79 AN years.{{AgeAN|1587|noAN=y}}
, to display the age of a character born in 1587 AN as a number only, Expression error: Unrecognized punctuation character "["..{{AgeAN|Expression error: Unrecognized punctuation character "[".}}
, drops the s for a character that is 1 year old, Expression error: Unrecognized punctuation character "[". AN years.