Re: Roman numeral support in Number type

2017-07-11 Thread Tab Atkins Jr.
On Thu, Jul 6, 2017 at 11:29 PM, kdex wrote: > Turns out the largest representable number is 39, > but this might be implementation-specific. Avoiding the more unusual characters is why CSS's roman-numeral list-numbering scheme is onl

Re: Roman numeral support in Number type

2017-07-06 Thread kdex
There's numerous problems with this approach. While ```js new Intl.NumberFormat("it-u-nu-roman").format(100035); ``` procudes "ↈXXXV", ```js new Intl.NumberFormat("it-u-nu-roman").format(100035000); ``` produces "100.035.000". Turns out the largest representable number is 39, but this mig

Re: Roman numeral support in Number type

2017-07-06 Thread Vic99999
Roman numerals are already supported by ECMAScript Internationalization API Specification:Try in Safari Browse:```new Intl.NumberFormat("it-u-nu-roman").format(10);```  ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/e

Re: Roman numeral support in Number type

2017-07-06 Thread Bob Myers
Can we also support Maya numbers ? [image: Inline image 1] They apparently do have a zero, the shell glyph which looks like [image: Inline image 2]. Newlines matter; each new line is multiplied by 20. Inexplicably, these glyphs do not yet seem to be in

Re: Roman numeral support in Number type

2017-07-06 Thread kdex
Oh, wow. Sorry, but I don't see this happening any time soon. Here's just a few problems: - Roman numerals are hardly ever used. - `0` does not have a standard representation. - Fraction representation is possible, but relatively complicated. - The set of characters used for Roman numerals is non

Roman numeral support in Number type

2017-07-06 Thread Owen Swerkstrom
This started as a joke, but after implementing it, I'd actually like to propose this as an addition and see what comes of it. I've added support for stringifying and parsing numbers to and from Roman numeral representation, using the usual Number functions: var num = 5; console.log(num.toS