How to get Decimal and Thousand separator of user personal settings in SharePoint JSOM
for example I can get date formatted using SP.Utilities.Utility.formatDateTime
...
IS there any way to get user's personal setting's Decimal Separator?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityHow to get Decimal and Thousand separator of user personal settings in SharePoint JSOM
for example I can get date formatted using SP.Utilities.Utility.formatDateTime
...
IS there any way to get user's personal setting's Decimal Separator?
I'd probably try something like this:
var number = 1000234.033;
var currentCulture = _spContextInfo.currentCultureName;
number.toLocaleString(currentCulture);
Also you could use toLocaleString()
if the user is already on his/her locale region, it will pick that up.