Template:Number to word/documentation: Difference between revisions

From The Languages of David J. Peterson
Jump to navigation Jump to search
(Created page with "{{documentation subpage}} Converts a given integer into a cardinal number or ordinal number in the English language. Anything between 10{{sup|126}} and −10{{sup|...")
 
m (Changed links to point to Wiktionary)
 
Line 1: Line 1:
{{documentation subpage}}
{{documentation subpage}}
Converts a given [[integer]] into a [[cardinal number]] or [[ordinal number]] in the English language. Anything between 10{{sup|126}} and −10{{sup|126}} is supported, as well as some larger numbers such as one centillion and one millinillion.
Converts a given {{wt|integer}} into a {{wt|cardinal number}} or {{wt|ordinal number}} in the English language. Anything between 10{{sup|126}} and −10{{sup|126}} is supported, as well as some larger numbers such as one centillion and one millinillion.


===Usage===
===Usage===
Line 13: Line 13:
''ord'': Optional. If the value is "on", the output is an ordinal number, otherwise it is a cardinal number.
''ord'': Optional. If the value is "on", the output is an ordinal number, otherwise it is a cardinal number.


''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]].
''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 {{wt|English numerals}}.


=== Examples ===
=== Examples ===

Latest revision as of 02:18, 25 August 2024

Documentation for Template:Number to word. [edit]
This page contains usage information, categories, interwiki links and other content describing the template.

Converts a given integer into a cardinal number or ordinal number in the English language. Anything between 10126 and −10126 is supported, as well as some larger numbers such as one centillion and one millinillion.

Usage

{{number to word|integer[|zero=zero][|adj=on][|us=on][|ord=on]}}

integer: Required. A natural number in the range of 10126 and −10126 is, as well as some larger numbers such as one centillion and one millinillion.

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

adj: Optional. If the value is "on", the output is hyphenated.

ord: Optional. If the value is "on", the output is an ordinal number, otherwise it is a cardinal number.

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.

Examples

{{number to word|-999999|adj=on}} negative-nine-hundred-ninety-nine-thousand-nine-hundred-and-ninety-nine
{{number to word|-1001|us=on}} negative one thousand one
{{number to word|-235|us=on|adj=on}} negative-two-hundred-thirty-five
{{number to word|-100}} negative one hundred
{{number to word|-30}} negative thirty
{{number to word|0|zero=not a sausage|adj=on}} not-a-sausage
{{number to word|30}} thirty
{{number to word|100}} one hundred
{{number to word|235|us=on|adj=on}} two-hundred-thirty-five
{{number to word|1001}} one thousand and one
{{number to word|999999|adj=on}} nine-hundred-ninety-nine-thousand-nine-hundred-and-ninety-nine
{{number to word|999999|adj=on|ord=on}} nine-hundred-ninety-nine-thousand-nine-hundred-and-ninety-ninth
{{number to word|9999999999999999}} nine quadrillion nine hundred ninety-nine trillion nine hundred ninety-nine billion nine hundred ninety-nine million nine hundred ninety-nine thousand nine hundred and ninety-nine

Technical information

This template uses Module:ConvertNumeric.

See also