标签: javascript momentjs
首先,我指的是: Get the time difference between two datetimes
然后,它并不像我使用iso时间格式那样工作。
var now = '2014-12-12T09:30:00.0000000Z'; var then = '2014-12-12T11:00:00.0000000Z'; var timeDuration = moment.utc(moment(now)).diff(moment(then)).format("HH:mm:ss");