isDate (obj);. 要检查变量是否为原生js Date 对象,则使用 moment.isDate() 。 moment.isDate(); // false moment.isDate(new Date()); // true moment.
確定! 回上一頁