Javascript JS/Node.JS如何获取此格式的日期/时间:2017-03-13T04:43:30.916Z
我希望以这种格式获取当前时间。 就像在Go中一样,导入时间,然后time.now()将以这种格式提供当前时间。我确信有一个图书馆可以做到这一点,但我在google/这里很难找到它。 有没有人知道这是什么,或者能给我指出正确的方向?多谢 使用:Javascript JS/Node.JS如何获取此格式的日期/时间:2017-03-13T04:43:30.916Z,javascript,node.js,Javascript,Node.js,我希望以这种格式获取当前时间。 就像在Go中一样,导入时间,然后time.now()将以这种格式提供当前时间。我确信有一个图书馆可以做到这一点,但我在google/这里很难找到它。 有没有人知道这是什么,或者能给我指出正确的方向?多谢 使用: new Date().toISOString() 使用: new Date().toISOString() 签出moment.jsnew Date(Date.now()).toISOString()check@AndrewEvtnew Date
new Date().toISOString()
使用:
new Date().toISOString()
签出moment.js
new Date(Date.now()).toISOString()
check@AndrewEvtnew Date().toISOString()是enough@AatishSai-用“use moment.js”回答日期问题就像用“use prototype.js”回答DOM问题一样,或者不管你的库是什么(Date.now()).toISOString()
check@AndrewEvtnew Date().toISOString()
enough@AatishSai-用“use moment.js”回答日期上的问题就像用“use prototype.js”或任何你的库来回答DOM问题一样。