Check time difference in Javascript

后端 未结 18 1161
梦毁少年i
梦毁少年i 2020-11-22 04:27

How would you check time difference from two text-boxes in Javascript?

18条回答
  •  心在旅途
    2020-11-22 04:56

    You can use moment js for this purpose. momentJs 'fromNow()' will give you any time difference from current time.

    var m1 = any date time on moment format;
    
    console.log(m1.fromNow());
    

提交回复
热议问题