.diff is not a function on moments.js

前端 未结 1 337
-上瘾入骨i
-上瘾入骨i 2020-12-19 23:32

I try to do a little script using moment.js, that shows me how many hours and minutes (seperate) I have until a specific hour.

var TimeA = moment(\'08:00:00\         


        
相关标签:
1条回答
  • 2020-12-20 00:08

    When you call .format(), what you get back is a String. You're no longer dealing with a moment object.

    0 讨论(0)
提交回复
热议问题