date format in d3, would like to have month as an integer instead of decimal

♀尐吖头ヾ 提交于 2019-12-06 11:22:20

See the part about padding:

The % sign indicating a directive may be immediately followed by a padding modifier:

  • 0 - zero-padding
  • _ - space-padding
  • - - disable padding

For example, "%-m/%-d" will disable padding for both the month and date, giving you "6/1" for June 1st, as opposed to "%m/%d" which gives "06/01".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!