更新时间:2023-01-16 09:28:04
Date
的构造方法使用数字,而不是字符串.要么直接输入:
Date
's constructor takes a number, not a string. Either feed it in directly:
date = 1475235770601; // Note the lack of quotes making it a number
或者,如果您已经有一个字符串,则将其显式转换:
Or, if you already have a string, convert it explicitly:
date = parseInt(date);