adamwdraper / Numeral-js

A javascript library for formatting and manipulating numbers.
http://numeraljs.com
MIT License
9.66k stars 925 forks source link

Chinese and Japanese don't really use numeric group separators #354

Open timmcintosh opened 7 years ago

timmcintosh commented 7 years ago

Hi Adam,

Thank you and other contributors for developing this library. Chinese (simplified and traditional) and Japanese users don't really use numeric group separators . It's more of a western language thing. Besides, they actually group every 4 numbers, not every 3 numbers. Is there any convenient way we can handle this? Thank you.

caguthrie commented 7 years ago

+1

yushiyangk commented 7 years ago

East Asian numerals are formatted 7,0000,0000 if digit separators are used at all. And the "abbreviation" labels (they are actually full-form representations of the numerals) should also be used for every factor of 10^4 instead of 10^3.

Presently, the labels are 千 - thousand ; should be removed 百万 - (hundred)(ten thousand) ; should be refactored to 万 (ten thousand) 十亿 - (ten)(hundred million) ; should be refactored to 亿 (hundred million) 兆 - short trillion ; this is correct

In a similar vein, Indian numerals are formatted 7,00,00,00,000. Yes, the least significant group is different in length from the rest.

There are several assumptions made that completely break quite a number of locales. (Another issue that comes to mind is that ordinals in many languages depend on grammatical context, such as grammar or case, that they appear in.)

wuzhuzhu commented 7 years ago

+1

leggewie commented 7 years ago

This is a dupe of #248