Numeral-js: leading zeros??

Created on 20 Oct 2015  路  15Comments  路  Source: adamwdraper/Numeral-js

Hi - Is there any way to have this package format for leading zeros?

numeral( 1 ).format('zzzz') => "0001"

format

Most helpful comment

This is done on numbro fork (numbrojs.com):

numbro(300).format("00000") // "00300"

All 15 comments

+1

+1

+1

+1

+1

+1

+1

This is done on numbro fork (numbrojs.com):

numbro(300).format("00000") // "00300"

Could we merge this into master please? :-) Not having this a show stopper for my use case ... I just want sprintf. 馃槣

And I'm willing to help with that, if you need me to ... I'm not just trying to whine.

+1

PS - I vote for the syntax of numeral(300).format('00000) => "00300". It seems more consistent with the current numeral.js design.

+1

+1

+1

Will be added in 2.0.5

Was this page helpful?
0 / 5 - 0 ratings

Related issues

garbinmarcelo picture garbinmarcelo  路  5Comments

chumager picture chumager  路  3Comments

jfstephe picture jfstephe  路  4Comments

watanas picture watanas  路  4Comments

ragulka picture ragulka  路  6Comments