date-format
node 时间格式化
npm install date-format
var format = require('date-format');
format(); //defaults to ISO8601 format and current date.
format(new Date());
format('hh:mm:ss.SSS', new Date());
format('yyyy-MM-dd hh:mm:ss.SSS', new Date());
dd - date.getDate()
MM - date.getMonth() + 1
yy - date.getFullYear().toString().substring(2, 4)
yyyy - date.getFullYear()
hh - date.getHours()
mm - date.getMinutes()
ss - date.getSeconds()
SSS - date.getMilliseconds()