moment calculate difference between dates in years code example
Example: calculate time difference in hrs moment
var duration = moment.duration(end.diff(startTime));
var hours = duration.asHours();
var duration = moment.duration(end.diff(startTime));
var hours = duration.asHours();