Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a2268592ae2e5cd4

Jump to content

Template:Cardinal/doc

From Wikipedia, the free encyclopedia

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.

This template should not be used in running prose in articles; it is intended for automated script processing of numeric data. Writing something like "on August {{cardinal|16th}}, 2004" serves no purpose, and just makes the wikicode harder to understand and edit.

Examples

[edit]
MarkupOutput
{{cardinal|-1st}}

-1

{{cardinal|0th}}

0

{{cardinal|1st}}

1

{{cardinal|2nd}}

2

{{cardinal|3rd}}

3

{{cardinal|4th}}

4

{{cardinal|1,234th}}

1,234

{{cardinal|blahblah}}

blahblah

See also

[edit]
  • {{ordinal}}, add an ordinal indicator to a cardinal number
  • {{digits}}, remove all characters from a string that are not digits
  • {{str number/trim}}, remove the first non-digit character and everything following