【发布时间】:2018-01-06 22:46:42
【问题描述】:
我正在尝试将时间调到下一个“6:00:00”,我正在使用时刻:
let shiftEnd = moment("06:00:00", "HH:mm:ss")
console.log(shiftEnd.inspect())
它让我获得了前一个 6:00:00,即与 now() 同一天的那个。
moment("2017-07-31T06:00:00.000")
now() 是:
moment("2017-07-31T12:20:57.076")
下一个早上 6 点尚未过去的最佳方式是什么?
【问题讨论】:
标签: javascript date time momentjs date-manipulation