Browse the docs

parseRoman

Reads a Roman numeral as a number.

Details #

parseRoman(text) reads a Roman numeral from I to MMMCMXCIX, in capitals or lower case. Only the standard spelling reads: IV yes, IIII and VX no.

Parameters #

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

Examples #

parseRoman("MCMXCIV")
→ 1994
parseRoman("xiv")
→ 14

Gotchas #

  • Anything else fails with parseRoman() couldn't read.