function formatDate(time) { console.log(time); var t = getDate(time); var tf = function(i){return (i < 10 ? '0' : '') + i}; var year = t.getFullYear(); var month = tf(t.getMonth() + 1); var day = tf(t.getDate()); var hour = tf(t.getHours()); var minute = tf(t.getMinutes()); return month + '-' + day + ' ' + hour + ':' + minute; } module.exports.formatDate = formatDate; {{ item.user.wechatName }} {{ wxs.formatDate(item.fans.gmtCreated) }}