Template:Ordinal: Difference between revisions
From LGPedia
Jump to navigationJump to search
New page: {{{1}}}{{#ifeq: {{#expr: {{#expr: {{{1}}} mod 100}} round -1}} |10|th |{{#ifeq:{{#expr:{{{1}}} mod 10}}|1|st |{{#ifeq:{{#expr:{{{1}}} mod 10}}|2|nd |{{#ifeq:{{#expr:{{{1}}} mod 10}}|3|rd |... |
m hehe |
||
| Line 13: | Line 13: | ||
</pre> | </pre> | ||
where NUM is a positive integer. This template will add the appropriate ordinal suffix to NUM. For example, <nowiki>{{Ordinal|101}}</nowiki> produces 101st. | where NUM is a positive integer. This template will add the appropriate ordinal suffix to NUM. For example, <nowiki>{{Ordinal|101}}</nowiki> produces 101st. | ||
[[Category:Templates]] | [[Category:Templates]]</noinclude> | ||
Revision as of 21:07, 12 March 2008
{{{1}}}th
Usage
{{Ordinal|NUM}}
where NUM is a positive integer. This template will add the appropriate ordinal suffix to NUM. For example, {{Ordinal|101}} produces 101st.