Difference between revisions of "Template:Cardinal/doc"
Jump to navigation
Jump to search
imported>SMcCandlish (Note to not muck up normal article text with this) |
imported>Renamed user 7hq09uwypo226qfc |
||
| Line 20: | Line 20: | ||
<includeonly> | <includeonly> | ||
<!-- Categories go here, and interwikis go in Wikidata --> | <!-- Categories go here, and interwikis go in Wikidata --> | ||
| − | [[Category: | + | [[Category:Number templates]] |
</includeonly> | </includeonly> | ||
Revision as of 19:48, 5 October 2018
| This is a documentation subpage for Template:Cardinal. It contains usage information, categories and other content that is not part of the original template page. |
| This template uses Lua: |
This template converts an ordinal number into a cardinal number by stripping the ordinal indicator off the end of the only parameter. Specifically, it removes any series of letters that immediately follows a numeral.
This template should not be used in running prose in articles; it is intended for automated script processing of numeric data. Writing something like "on August {{cardinal|16th}}, 2004" serves no purpose, and just makes the wikicode harder to understand and edit.
Usage
{{cardinal|-1st}}→ -1{{cardinal|0th}}→ 0{{cardinal|1st}}→ 1{{cardinal|2nd}}→ 2{{cardinal|3rd}}→ 3{{cardinal|4th}}→ 4{{cardinal|1,234th}}→ 1,234
See also
- {{ordinal}}, which adds an ordinal indicator to a cardinal number