Browse the docs

roman

Writes a whole number from 1 to 3999 as a Roman numeral.

Details #

roman(n) writes the standard Roman numeral for 1 to 3999: 1994 is MCMXCIV.

Parameters #

Takes 1 argument. {{ roman(text) }}

Examples #

roman(1994)
→ MCMXCIV
roman(4)
→ IV

Gotchas #

  • 0, negative numbers and 4000 or more fail with roman() needs a whole number from 1 to 3999.