Difference between revisions of "Template:Cardinal/doc"
Jump to navigation
Jump to search
imported>The Mol Man |
(Fixed typo) |
||
| Line 2: | Line 2: | ||
{{Lua|Module:String|category=Lua String-based templates}} | {{Lua|Module:String|category=Lua String-based templates}} | ||
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> | <!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> | ||
| − | This template converts an [[Ordinal number (linguistics)|ordinal number]] into a [[Cardinal number (linguistics)|cardinal number]] by stripping the [[ordinal indicator]] off the end of the only parameter. Specifically, it removes any series of letters that | + | This template converts an [[Ordinal number (linguistics)|ordinal number]] into a [[Cardinal number (linguistics)|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. |
== Usage == | == Usage == | ||
Revision as of 09:54, 15 August 2016
| 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.
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