• Home
  • Random
  • Recent changes
  • Special pages
  • Settings
  • About MOASSpedia
  • Disclaimers
MOASSpedia
  • 216.73.216.154
  • Talk
  • Watchlist
  • Contributions
  • Log in

Template:Ordinal to word

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here
Template documentation[view] [edit] [history] [purge]
This template uses Lua:
  • Module:ConvertNumeric

Converts an integer in the range -999,999 to 999,999 into an ordinal number in the English language.

Usage

{{Ordinal to word|integer[|zeroth=zeroth][|us=on]}}

integer: Required. An integer in the range -999,999 to 999,999.

zeroth: Optional. The value to use when the number is 0. Default is "zeroth". Can be made empty or, for example, "seed" or "one before the first" as appropriate for the context.

us: Optional. If the value is "on", the output of numbers does not include "and" to separate hundreds from smaller values, nor to separate thousands from hundreds. This accords with American usage as described at English numerals.

This template should not be used in running prose in articles; it is intended for automated script processing of numeric data. Writing something like "in the {{ordinal to word|13}} match of the seasons" serves no purpose, and just makes the wikicode harder to understand and edit.

Examples

{{Ordinal to word|-999999}}
{{Ordinal to word|-1001|us=on}}
{{Ordinal to word|-100}}
{{Ordinal to word|-30}}
{{Ordinal to word|0|zeroth=not a sausage}}
{{Ordinal to word|30}}
{{Ordinal to word|100}}
{{Ordinal to word|1001|us=on}}
{{Ordinal to word|999999}}

produces:

negative nine hundred ninety-nine thousand nine hundred and ninety-ninth
negative one thousand first
negative one hundredth
negative thirtieth
not a sausage 
thirtieth
one hundredth
one thousand first
nine hundred ninety-nine thousand nine hundred and ninety-ninth

See also

  • Template:Number to word
The above documentation is transcluded from Template:Ordinal to word/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://moasspedia.org/w/index.php?title=Template:Ordinal_to_word&oldid=25976"
Categories:
  • Lua-based templates
  • Numbers as words conversion templates
Last edited on 4 December 2018, at 01:41

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 4 December 2018, at 01:41.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop