Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Category:Pages with non-numeric formatnum arguments

Help
From Wikipedia, the free encyclopedia
This is amaintenancecategory, used formaintenance of the Wikipedia project. It is not part of the encyclopedia and containsnon-article pages, or groups articles by status rather than subject. Do not include this category in content categories (except foreponymous maintenance categories).
This is atracking category. It builds and maintains a list of pages primarily for the sake of the list itself. They are not part of theencyclopedia's categorization scheme.
  • This category ishidden on itsmember pages—unless the correspondinguser preference (Appearance → Show hidden categories) is set.
  • These categories can be used to track, build and organize lists of pages needing "attentionen masse" (for example, pages using deprecated syntax), or that may need to be edited at someone's earliest convenience.
  • These categories also serve to aggregate members of several lists or sub-categories into a larger, more efficient list (discriminated by classifications).
Administrators: Please do not delete this category even if it is empty! This category may be empty occasionally or even most of the time.

This category collects pages that use theformatnumparser 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:

  • Ifformatnum 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 ofMOS: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 inthis edit.

Other:

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

Subcategories

This category has the following 3 subcategories, out of 3 total.

Pages in category "Pages with non-numeric formatnum arguments"

The following 200 pages are in this category, out of approximately 45,314 total.This list may not reflect recent changes.

(previous page) (next page)

0–9

(previous page) (next page)
Retrieved from "https://en.wikipedia.org/w/index.php?title=Category:Pages_with_non-numeric_formatnum_arguments&oldid=1208603191"
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp