Difference between revisions of "Template:Numtext"
From LGPedia
(Categorized, further documentation.) |
(Fixing single-digit-range) |
||
Line 1: | Line 1: | ||
− | <includeonly>{{#ifexpr: {{{1}}} mod 100 | {{#ifexpr: ({{{1}}}-({{{1}}} mod 100)) / 100 | {{numtext/single|{{#expr: ({{{1}}}-({{{1}}} mod 100)) / 100}}}}-hundred <nowiki> </nowiki>|}}{{#ifexpr: (({{{1}}} mod 100) > 10) and (({{{1}}} mod 100) < 20)|{{numtext/special|{{#expr: {{{1}}} mod 10}}| count }}|{{numtext/double|{{#expr: (({{{1}}} mod 100) - ({{{1}}} mod 10)) / 10}}| {{#ifexpr: not ({{{1}}} mod 10) | count |}}}}{{#ifexpr: ({{{1}}} mod 10) and ({{{1}}} > 20) | - |}}{{numtext/single|{{#expr: {{{1}}} mod 10}}|count}}}}|{{#ifexpr: {{{1}}} | {{numtext/single|{{#expr: ({{{1}}}-({{{1}}} mod 100)) / 100}}}}-hundredth|zeroth}}}}</includeonly><noinclude>This template converts integers, specifically episode numbers, into their textual, counting representation, e.g. it turns 251 into "two-hundred fifty-first". | + | <includeonly>{{#ifexpr: {{{1}}} mod 100 | {{#ifexpr: ({{{1}}}-({{{1}}} mod 100)) / 100 | {{numtext/single|{{#expr: ({{{1}}}-({{{1}}} mod 100)) / 100}}}}-hundred <nowiki> </nowiki>|}}{{#ifexpr: (({{{1}}} mod 100) > 10) and (({{{1}}} mod 100) < 20)|{{numtext/special|{{#expr: {{{1}}} mod 10}}| count }}|{{numtext/double|{{#expr: (({{{1}}} mod 100) - ({{{1}}} mod 10)) / 10}}| {{#ifexpr: not ({{{1}}} mod 10) | count |}}}}{{#ifexpr: ({{{1}}} mod 10) and (({{{1}}} mod 100) > 20) | - |}}{{numtext/single|{{#expr: {{{1}}} mod 10}}|count}}}}|{{#ifexpr: {{{1}}} | {{numtext/single|{{#expr: ({{{1}}}-({{{1}}} mod 100)) / 100}}}}-hundredth|zeroth}}}}</includeonly><noinclude>This template converts integers, specifically episode numbers, into their textual, counting representation, e.g. it turns 251 into "two-hundred fifty-first". |
==Usage== | ==Usage== |
Revision as of 23:26, 2 October 2007
This template converts integers, specifically episode numbers, into their textual, counting representation, e.g. it turns 251 into "two-hundred fifty-first".
Usage
{{numtext|EPISODE NUMBER}}
To reduce load on the server, {{subst:{{numtext|EPISODE NUMBER}}}}
can be used, although this requires manual text changes later, rather than just the number.
To edit numeral phrases, edit Numtext/single single-digit numbers, Numtext/double for double-digit numbers, and Numtext/special for numbers 11-19.