René's URL Explorer Experiment


Title: toLocaleString() doesn't localise the number · Issue #8249 · NativeScript/NativeScript · GitHub

Open Graph Title: toLocaleString() doesn't localise the number · Issue #8249 · NativeScript/NativeScript

X Title: toLocaleString() doesn't localise the number · Issue #8249 · NativeScript/NativeScript

Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: ? Cross-platform modules: ? Android Runtime...

Open Graph Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: ? C...

X Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: ? C...

Opengraph URL: https://github.com/NativeScript/NativeScript/issues/8249

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"toLocaleString() doesn't localise the number","articleBody":"**Environment**\r\nProvide version numbers for the following components (information can be retrieved by running `tns info` in your project folder or by inspecting the `package.json` of the project):\r\n - CLI: ?\r\n - Cross-platform modules: ?\r\n - Android Runtime: ?\r\n - iOS Runtime: ?\r\n - Plugin(s): ?\r\n\r\nI'm running the latest version of everything (the project is a month old), but couldn't find any version numbers matching the mentioned packages in with either `tns info` or by looking in my package file.\r\n\r\n**Describe the bug**\r\n\u003c!-- A clear and concise description of what the bug is. Please, explain whether it's a build time error or a runtime error. More detailed logs can be easily obtained by following the instructions in this guide: https://docs.nativescript.org/get-support#how-to-obtain-diagnostic-reports. -->\r\n\r\nTo format nice readable numbers all modern browsers support the function `toLocaleString`, which helps adding localised thousand separators, decimal separators, rounding of decimals, padding of decimals and a lot more.\r\nIn NativeScript this functions returns the same value as `toString` which doesn't support any of the mentioned features.\r\n\r\n**To Reproduce**\r\n\u003c!-- Add commands used or steps taken to reproduce the behaviour. -->\r\n```javascript\r\nconst someNumber = 1337.4242\r\nconst formattedNumber = someNumber.toLocaleString('en', {maximumFractionDigits: 2})\r\n```\r\n\r\n**Expected behavior**\r\n`formattedNumber` should now contain the string `1,337.42`\r\nInstead it contains the string `1337.4242`\r\n\r\n**Sample project**\r\n\u003c!-- If possible, provide a link from the [Playground](https://play.nativescript.org) with reproduction of the problem. If not, consider attaching a sample project or link to a repository with such project. -->\r\nI don't have a sample project, but expect the behaviour to be the same in alle projects.\r\n\r\n**Additional context**\r\n\u003c!-- Add any other context about the problem here. -->\r\nWe could implement a formatting function ourself, but because of code sharing between projects, it would also mean that this custom formatter would be used in our web based projects, which seems a bit silly, since the browsers already know how to format numbers.\r\n\r\nDocumentation for the browser implementation can be found here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString","author":{"url":"https://github.com/Znegl","@type":"Person","name":"Znegl"},"datePublished":"2020-01-15T12:27:07Z","url":"https://github.com/NativeScript/NativeScript/issues/8249"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7e12bc1e-d09a-29bb-8104-1289139a407d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAED8:2C4BED:121CF59:1711E18:6B011DD8
html-safe-nonce0c29e0f80970cb8b7913e2635b30e5296ce20e192f00069d2cf30b65cd8c1490
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRUQ4OjJDNEJFRDoxMjFDRjU5OjE3MTFFMTg6NkIwMTFERDgiLCJ2aXNpdG9yX2lkIjoiMTQ5Nzk3MTEyMTYwNDA3NDk2OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace29ff334412b80a3120d35360131d2d14e14f4e3003185efcef879712f0ec97f
hovercard-subject-tagissue:550156302
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/8249/issue_layout
twitter:imagehttps://opengraph.githubassets.com/94b2c14b3a630502de56581ae4781c8df781b340f4486269c4d17062044c2a7d/NativeScript/NativeScript/issues/8249
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/94b2c14b3a630502de56581ae4781c8df781b340f4486269c4d17062044c2a7d/NativeScript/NativeScript/issues/8249
og:image:altEnvironment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: ? C...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameZnegl
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id31492490
octolytics-dimension-repository_nwoNativeScript/NativeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31492490
octolytics-dimension-repository_network_root_nwoNativeScript/NativeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/NativeScript/NativeScript/issues/8249#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F8249
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F8249
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=NativeScript%2FNativeScript
Reloadhttps://github.com/NativeScript/NativeScript/issues/8249
Reloadhttps://github.com/NativeScript/NativeScript/issues/8249
Reloadhttps://github.com/NativeScript/NativeScript/issues/8249
NativeScripthttps://github.com/NativeScript
NativeScripthttps://github.com/NativeScript/NativeScript
Codehttps://github.com/NativeScript/NativeScript
Issues231 (231)https://github.com/NativeScript/NativeScript/issues
Pull requests107 (107)https://github.com/NativeScript/NativeScript/pulls
Discussionshttps://github.com/NativeScript/NativeScript/discussions
Actionshttps://github.com/NativeScript/NativeScript/actions
Projectshttps://github.com/NativeScript/NativeScript/projects
Wikihttps://github.com/NativeScript/NativeScript/wiki
Security and qualityhttps://github.com/NativeScript/NativeScript/security
Insightshttps://github.com/NativeScript/NativeScript/insights
https://github.com/NativeScript/NativeScript
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/8249
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/8249
toLocaleString() doesn't localise the numberhttps://github.com/NativeScript/NativeScript/issues/8249#top
os: androidhttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22os%3A%20android%22
https://github.com/Znegl
Zneglhttps://github.com/Znegl
on Jan 15, 2020https://github.com/NativeScript/NativeScript/issues/8249#issue-550156302
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleStringhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString
https://github.com/NickIliev
NickIlievhttps://github.com/NickIliev
on Jan 15, 2020https://github.com/NativeScript/NativeScript/issues/8249#issuecomment-574653384
NickIlievhttps://github.com/NickIliev
os: androidhttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22os%3A%20android%22
on Jan 15, 2020https://github.com/NativeScript/NativeScript/issues/8249#event-2950741348
https://github.com/Znegl
Zneglhttps://github.com/Znegl
on Jan 15, 2020https://github.com/NativeScript/NativeScript/issues/8249#issuecomment-574687298
https://github.com/NickIliev
NickIlievhttps://github.com/NickIliev
on Jan 15, 2020https://github.com/NativeScript/NativeScript/issues/8249#issuecomment-574690633
NickIlievhttps://github.com/NickIliev
completedhttps://github.com/NativeScript/NativeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jan 15, 2020https://github.com/NativeScript/NativeScript/issues/8249#event-2951058429
https://github.com/keithgulbro
keithgulbrohttps://github.com/keithgulbro
on Apr 13, 2020https://github.com/NativeScript/NativeScript/issues/8249#issuecomment-613008505
https://github.com/andresilva-cc
andresilva-cchttps://github.com/andresilva-cc
on May 26, 2020https://github.com/NativeScript/NativeScript/issues/8249#issuecomment-634046348
Sign up for freehttps://github.com/signup?return_to=https://github.com/NativeScript/NativeScript/issues/8249
Sign in to commenthttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/8249
os: androidhttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22os%3A%20android%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.