Answers for "moment js convert duration to time"

1

moment calculate duration

moment
 .duration(moment(endTime, 'YYYY/MM/DD HH:mm')
 .diff(moment(startTime, 'YYYY/MM/DD HH:mm'))
 ).asHours()
Posted by: Guest on February-26-2021
3

moment set hours

const date = moment()

date.set({ 
  hour:0,
  minute:0,
  second:0,
  millisecond:0
})
Posted by: Guest on August-18-2021

Code answers related to "moment js convert duration to time"

Code answers related to "Javascript"

Browse Popular Code Answers by Language