adobe / adobe.github.com

Adobe central hub for open source
https://opensource.adobe.com
MIT License
1.42k stars 340 forks source link

Fix niceNum implementation #122

Open danmooney2 opened 1 year ago

danmooney2 commented 1 year ago

image

Description

Previous state hardcoded the thousands separators. I'm not sure which locale uses an apostrophe (') as a thousands separator but for the majority of the world that is not correct. Number.prototype.toLocaleString will format numbers based on user's locale.

Source: https://docs.oracle.com/cd/E19455-01/806-0169/overview-9/index.html

Related Issue

Motivation and Context

Readability

How Has This Been Tested?

Locally

Screenshots (if appropriate):

Types of changes

Checklist: