1var now = "04/09/2013 15:00:00";
2var then = "02/09/2013 14:20:30";
3
4var ms = moment(now,"DD/MM/YYYY HH:mm:ss").diff(moment(then,"DD/MM/YYYY HH:mm:ss"));
5var d = moment.duration(ms);
6var s = d.format("hh:mm:ss");
7
8// outputs: "48:39:30"
1var now = "04/09/2013 15:00:00";
2var then = "04/09/2013 14:20:30";
3
4moment.utc(moment(now,"DD/MM/YYYY HH:mm:ss").diff(moment(then,"DD/MM/YYYY HH:mm:ss"))).format("HH:mm:ss")
5
6// outputs: "00:39:30"
1var a = moment([2007, 0, 29]);
2var b = moment([2007, 0, 28]);
3a.diff(b, 'days') // 1
4