Ox.formatRoman: add tests
This commit is contained in:
parent
14d57f70bb
commit
35df921fcd
1 changed files with 6 additions and 2 deletions
|
@ -633,12 +633,16 @@ Ox.formatPercent = function(number, total, decimals) {
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
Ox.formatRoman <f> Formats a number as a roman numeral
|
Ox.formatRoman <f> Formats a number as a roman numeral
|
||||||
|
> Ox.formatRoman(1888)
|
||||||
|
'MDCCCLXXXVIII'
|
||||||
> Ox.formatRoman(1999)
|
> Ox.formatRoman(1999)
|
||||||
'MCMXCIX'
|
'MCMXCIX'
|
||||||
> Ox.formatRoman(2001)
|
> Ox.formatRoman(2002)
|
||||||
'MMI'
|
'MMII'
|
||||||
> Ox.formatRoman(0)
|
> Ox.formatRoman(0)
|
||||||
''
|
''
|
||||||
|
> Ox.formatRoman(9.9)
|
||||||
|
'XI'
|
||||||
> Ox.formatRoman(10000)
|
> Ox.formatRoman(10000)
|
||||||
'MMMMMMMMMM'
|
'MMMMMMMMMM'
|
||||||
@*/
|
@*/
|
||||||
|
|
Loading…
Reference in a new issue