Get the time difference between two datetimes

前端 未结 19 2005
花落未央
花落未央 2020-11-22 05:25

I know I can do anything and some more envolving Dates with momentjs. But embarrassingly, I\'m having a hard time trying to do something that seems simple: geting the differ

19条回答
  •  再見小時候
    2020-11-22 06:01

    Use this,

      var duration = moment.duration(endDate.diff(startDate));
    
        var aa = duration.asHours();
    

提交回复
热议问题