How do I do Indian-style comma formatting with Numeral.js? Like so: 10,00,00,000, with thousands grouped in three digits and everything else in two digits.
Japanese numbers used to be delimited with commas every four digits, like so: 1,0000,0000 due to the largest common single-use (i.e., not a combination of a small number plus a large number as in "hundred thousand") being 10,000 (万, man).
Nowadays I've only ever seen US-style commas and it's hard to even find a reference to the four-digit commas online.
Thanks for sharing! Unfortunately, bytes representations are wrong.
As you may now, there is a difference between kilobytes (KB) and kibibytes (KiB), megabytes (MB) and mibibytes (MiB) et cetera. 1 KiB = 1024 bytes = 1.024 KB.
Thanks, I learned something new! But yeah, as other people have pointed out, browser support starts with IE 11 and almost no mobile browser supports it - so it might as well not exist.
You raise an interesting point: if we were the only ones in charge I'd say that a sizable proportion of us, developers, would target Chrome and only Chrome. But we unfortunately have to deal with functional specs and project managers and "clients" (whatever that is) and older browsers that force us to think in compatibility terms rather than coolness terms.
I work for a company where we still have customers using IE 7, so I know what you mean.
But no, I don't want to develop only for Chrome, and these days, you see a lot of that happening on "cool tech", even when there is the equivalent in, at least, Firefox.
That said, numeral.js doesn't look like just subset, it's got a nice interface to work with, and you don't have to worry about cross-browser inconsistency. You just have to believe this library does everything correctly for each language/locale.
Yep, more specifically (for this situation) numbers and currencies formatting (and format patterns)[0] and the related data in the CLDR (the LDML defines the CLDR's structures, the CLDR itself holds locale data such as the actual patterns and specific translated terms)
Shameless plug: as part of the in-browser XLS parsing, we built a library for formatting numbers: https://github.com/SheetJS/ssf