s-yadav / react-number-format

React component to format numbers in an input or as a text.
MIT License
3.88k stars 409 forks source link

Currency formatting for chinese is not working properly #643

Open kreshjaque opened 2 years ago

kreshjaque commented 2 years ago

Describe the issue and the actual behavior

i am using thousandsGroupStyle = wan to formate the chinese currency and getiing this '1,2345,6789' as a result

Describe the expected behavior

As per https://www.thefinancials.com/Default.aspx?SubSectionID=curformat the formating is in thousand spacing

image

So can you help us and let us know which is the right formate

yume-chan commented 2 years ago

In case of you didn't know already, "wan" (万) means "ten thousand" in Chinese, thus grouping by four digits. I don't know the international standard, but grouping by ten thousand is very common in China.

Can you use thousandsGroupStyle="thousand" instead if you want to follow your rule?