get total duration from moment time javascript code example
Example: moment calculate duration
moment
.duration(moment(endTime, 'YYYY/MM/DD HH:mm')
.diff(moment(startTime, 'YYYY/MM/DD HH:mm'))
).asHours()
moment
.duration(moment(endTime, 'YYYY/MM/DD HH:mm')
.diff(moment(startTime, 'YYYY/MM/DD HH:mm'))
).asHours()