Creating Category:Pages with non-numeric formatnum arguments

Jump to navigation Jump to search

This category collects pages that use the formatnum parser function with a non-numeric or incorrectly formatted value, e.g. {{formatnum:foo}} or {{formatnum:12,345}}.

Ways to fix or work around this error inside template code:

  • If formatnum is being applied to a string that includes both a number and words, change it to wrap just the number. Example: {{formatnum:{{{var}}} dollars}}{{formatnum:{{{var}}}}} dollars
  • Another way to work around invalid input is to remove commas from the input like this: {{formatnum:{{replace|{{{var}}}|,|}}}}. Note that input using commas as decimal separators, in contravention of MOS:DECIMAL, will cause formatnum to produce invalid values. To fix the problem, use a full stop (period) as a decimal separator.
  • A limited way to work around invalid input in templates is to use {{digits}}, e.g. {{formatnum:{{digits|{{{votes}}}}}}}. This works only for whole numbers and will produce incorrect results for input containing decimal points or other non-numeric characters.

Ways to fix this error in articles:

  • When additional text or references exist in a template parameter that expects only numbers, find a way to move the additional text outside the template or into a different parameter. For example:
    • Currency templates like {{CAD}} or {{US$}} take only numeric input. Use {{US$|123}}{{nbsp}}million instead of {{US$|123 million}}
    • The |population_total= parameter in {{Infobox settlement}} should have only a number in it. Move any references to |population_footnotes=, as in this edit.

Other:

  • When formatnum is given a negative number written with the proper U+2212 "minus sign" (instead of the commonly used hyphen-minus key that appears on most keyboards), e.g. {{formatnum:−9000000}}, it assigns this error category; see T237467. A workaround for this incorrect usage was applied to {{US Census population}}, which shows population declines as negative numbers. You should use hyphen-minus within formatnum to avoid this error category and it will output the proper minus sign (see T10327).

This category collects pages that use the formatnum parser function with a non-numeric or incorrectly formatted value, e.g. {{formatnum:foo}} or {{formatnum:12,345}}.

Ways to fix or work around this error inside template code:

  • If formatnum is being applied to a string that includes both a number and words, change it to wrap just the number. Example: {{formatnum:{{{var}}} dollars}}{{formatnum:{{{var}}}}} dollars
  • Another way to work around invalid input is to remove commas from the input like this: {{formatnum:{{replace|{{{var}}}|,|}}}}. Note that input using commas as decimal separators, in contravention of MOS:DECIMAL, will cause formatnum to produce invalid values. To fix the problem, use a full stop (period) as a decimal separator.
  • A limited way to work around invalid input in templates is to use {{digits}}, e.g. {{formatnum:{{digits|{{{votes}}}}}}}. This works only for whole numbers and will produce incorrect results for input containing decimal points or other non-numeric characters.

Ways to fix this error in articles:

  • When additional text or references exist in a template parameter that expects only numbers, find a way to move the additional text outside the template or into a different parameter. For example:
    • Currency templates like {{CAD}} or {{US$}} take only numeric input. Use {{US$|123}}{{nbsp}}million instead of {{US$|123 million}}
    • The |population_total= parameter in {{Infobox settlement}} should have only a number in it. Move any references to |population_footnotes=, as in this edit.

Other:

  • When formatnum is given a negative number written with the proper U+2212 "minus sign" (instead of the commonly used hyphen-minus key that appears on most keyboards), e.g. {{formatnum:−9000000}}, it assigns this error category; see T237467. A workaround for this incorrect usage was applied to {{US Census population}}, which shows population declines as negative numbers. You should use hyphen-minus within formatnum to avoid this error category and it will output the proper minus sign (see T10327).

This category collects pages that use the formatnum parser function with a non-numeric or incorrectly formatted value, e.g. {{formatnum:foo}} or {{formatnum:12,345}}.

Ways to fix or work around this error inside template code:

  • If formatnum is being applied to a string that includes both a number and words, change it to wrap just the number. Example: {{formatnum:{{{var}}} dollars}}{{formatnum:{{{var}}}}} dollars
  • Another way to work around invalid input is to remove commas from the input like this: {{formatnum:{{replace|{{{var}}}|,|}}}}. Note that input using commas as decimal separators, in contravention of MOS:DECIMAL, will cause formatnum to produce invalid values. To fix the problem, use a full stop (period) as a decimal separator.
  • A limited way to work around invalid input in templates is to use {{digits}}, e.g. {{formatnum:{{digits|{{{votes}}}}}}}. This works only for whole numbers and will produce incorrect results for input containing decimal points or other non-numeric characters.

Ways to fix this error in articles:

  • When additional text or references exist in a template parameter that expects only numbers, find a way to move the additional text outside the template or into a different parameter. For example:
    • Currency templates like {{CAD}} or {{US$}} take only numeric input. Use {{US$|123}}{{nbsp}}million instead of {{US$|123 million}}
    • The |population_total= parameter in {{Infobox settlement}} should have only a number in it. Move any references to |population_footnotes=, as in this edit.

Other:

  • When formatnum is given a negative number written with the proper U+2212 "minus sign" (instead of the commonly used hyphen-minus key that appears on most keyboards), e.g. {{formatnum:−9000000}}, it assigns this error category; see T237467. A workaround for this incorrect usage was applied to {{US Census population}}, which shows population declines as negative numbers. You should use hyphen-minus within formatnum to avoid this error category and it will output the proper minus sign (see T10327).

This category currently contains no pages or media.

This category collects pages that use the formatnum parser function with a non-numeric or incorrectly formatted value, e.g. {{formatnum:foo}} or {{formatnum:12,345}}.

Ways to fix or work around this error inside template code:

  • If formatnum is being applied to a string that includes both a number and words, change it to wrap just the number. Example: {{formatnum:{{{var}}} dollars}}{{formatnum:{{{var}}}}} dollars
  • Another way to work around invalid input is to remove commas from the input like this: {{formatnum:{{replace|{{{var}}}|,|}}}}. Note that input using commas as decimal separators, in contravention of MOS:DECIMAL, will cause formatnum to produce invalid values. To fix the problem, use a full stop (period) as a decimal separator.
  • A limited way to work around invalid input in templates is to use {{digits}}, e.g. {{formatnum:{{digits|{{{votes}}}}}}}. This works only for whole numbers and will produce incorrect results for input containing decimal points or other non-numeric characters.

Ways to fix this error in articles:

  • When additional text or references exist in a template parameter that expects only numbers, find a way to move the additional text outside the template or into a different parameter. For example:
    • Currency templates like {{CAD}} or {{US$}} take only numeric input. Use {{US$|123}}{{nbsp}}million instead of {{US$|123 million}}
    • The |population_total= parameter in {{Infobox settlement}} should have only a number in it. Move any references to |population_footnotes=, as in this edit.

Other:

  • When formatnum is given a negative number written with the proper U+2212 "minus sign" (instead of the commonly used hyphen-minus key that appears on most keyboards), e.g. {{formatnum:−9000000}}, it assigns this error category; see T237467. A workaround for this incorrect usage was applied to {{US Census population}}, which shows population declines as negative numbers. You should use hyphen-minus within formatnum to avoid this error category and it will output the proper minus sign (see T10327).
Cancel Editing help (opens in new window)

Parser profiling data:

CPU time usage0.001 seconds
Real time usage0.001 seconds
Preprocessor visited node count0/1,000,000
Post-expand include size0/2,097,152 bytes
Template argument size0/2,097,152 bytes
Highest expansion depth0/40
Expensive parser function count0/100
Unstrip recursion depth0/20
Unstrip post-expand size0/5,000,000 bytes