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 · 1 comment

Comments

Projects
None yet
3 participants
@Jos512

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

This comment has been minimized.

Show comment
Hide comment
@Jos512

Jos512 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!

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

tpl/lang: Add NumFmt function
NumFmt formats a number with a given precision using the requested
decimal, grouping, and negative characters.

Fixes gohugoio#1444

@bep bep closed this in #2851 May 18, 2017

bep added a commit that referenced this issue May 18, 2017

tpl/lang: Add NumFmt function
NumFmt formats a number with a given precision using the requested
decimal, grouping, and negative characters.

Fixes #1444

@ghost ghost referenced this issue May 22, 2017

Open

spf13/hugo v0.21 released #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment