Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outputting numbers with thousands separators #1444

Closed
Jos512 opened this issue Sep 20, 2015 · 2 comments · Fixed by #2851 or #9548
Closed

Outputting numbers with thousands separators #1444

Jos512 opened this issue Sep 20, 2015 · 2 comments · Fixed by #2851 or #9548
Assignees
Milestone

Comments

@Jos512
Copy link

Jos512 commented Sep 20, 2015

Would it perhaps be possible to add thousand separators to Hugo?

We can already format dates, and I think it will be valuable if we can format numbers too. For example, instead of printing 2354098 formatting it to 2,354,098 makes it easier to read.

Also see the forum topic where Bep already linked to a code snippet for this with a very flexible license. :)

@Jos512
Copy link
Author

Jos512 commented Dec 7, 2016

Hi guys, I see that @digitalcraftsman created a formatnum function that addresses this issue. But I don't understand from the text that Github automatically inserted to this issue what its status is. Is it still open? Do I need to rewrite/expand on the issue? Thanks!

@moorereason moorereason added this to the v0.19 milestone Jan 2, 2017
@moorereason moorereason self-assigned this Jan 2, 2017
@bep bep removed this from the v0.19 milestone Feb 21, 2017
@bep bep added this to the v0.21 milestone Apr 26, 2017
moorereason added a commit to moorereason/hugo that referenced this issue May 18, 2017
NumFmt formats a number with a given precision using the requested
decimal, grouping, and negative characters.

Fixes gohugoio#1444
@bep bep closed this as completed in #2851 May 18, 2017
bep pushed a commit that referenced this issue May 18, 2017
NumFmt formats a number with a given precision using the requested
decimal, grouping, and negative characters.

Fixes #1444
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.