calculate time difference

前端 未结 4 824
醉话见心
醉话见心 2020-12-12 07:25

I have a jQuery clock that gives the time from 00:00 to 23:00.

Now I want to calculate the time difference between two times. Suppose the \"in\" time is 11:00, and t

4条回答
  •  天命终不由人
    2020-12-12 07:35

    you should try momentjs, i think its much better than datejs.

    According to momentjs example:

    var a = moment([2007, 0, 29]);
    var b = moment([2007, 0, 28]);
    a.diff(b, 'days') // 1 
    

提交回复
热议问题