Is there any way I can use the moment.js format
method on duration objects? I can't find it anywhere in the docs and it doesn't seen to be an attribute on duration objects.
I'd like to be able to do something like:
var diff = moment(end).unix() - moment(start).unix();
moment.duration(diff).format('hh:mm:ss')
Also, if there are any other libraries which can easily accommodate this sort of functionality, I'd be interested in recommendations.
Thanks!
HH:mm:ss
will give00:00:23
in my previous example. so just the wrong casing on the Hours part – Trinitroglycerinmoment.duration(diff_ms).humanize();
– Inlaw