📜  date.toisostring 不是函数 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:26.135000             🧑  作者: Mango

代码示例1
Date.now() returns a number which represents the number of milliseconds elapsed since the UNIX epoch. The toISOString method cannot be called on a number, but only on a Date object, like this:

var now = new Date();
var isoString = now.toISOString();
Or in one single line:

new Date().toISOString()