Comparing date part only without comparing time in JavaScript

后端 未结 22 1681
春和景丽
春和景丽 2020-11-22 10:59

What is wrong with the code below?

Maybe it would be simpler to just compare date and not time. I am not sure how to do this either, and I searched, but I couldn\'t

22条回答
  •  误落风尘
    2020-11-22 11:54

    You can use fp_incr(0). Which sets the timezone part to midnight and returns a date object.

提交回复
热议问题