标签: javascript date momentjs
如何计算现在和时间戳之间的天数差异?
我试过这个,但它返回NaN:
var timestamp = 1405951867, now = moment(), then = moment(timestamp), diff = now.diff(then, 'days');