Answers for "moment count hour between 2 date"

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 date difference in days

moment(new Date()).diff(moment(new Date()), 'days') // 0
Posted by: Guest on March-02-2021

Code answers related to "moment count hour between 2 date"

Code answers related to "Javascript"

Browse Popular Code Answers by Language