D3.js: Remove leading zero from time format
22nd September 2017In D3.js, all time format directives are zero-padded by default (except for %e which explicitly uses space-padding).
For example, using d3.timeFormat("%I:%M") will output 09:34.
To change the padding type, append a modifier to the directive’s %:
0to use zero-padding_to use space-padding-to disable padding altogether
Following the above example, using d3.timeFormat("%-I:%M") will yield 9:34.