How to format a duration in java? (e.g format H:MM:SS)
I’d like to format a duration in seconds using a pattern like H:MM:SS. The current utilities in java are designed to format a time but not a duration. 22 Answers 22
I’d like to format a duration in seconds using a pattern like H:MM:SS. The current utilities in java are designed to format a time but not a duration. 22 Answers 22
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 … Read more