0
根據值如何傳遞給moment
,我得到不同的輸出。他們有什麼不同?node.js&moment:基於價值傳遞的不同結果?
var moment = require('moment');
var aa = "1392018037000";
var bb = "1392057925366";
console.log(moment(aa).from(bb));
console.log(moment(1392018037000).from(1392057925366));
output:
a few seconds ago
11 hours ago