if ( Object.prototype.toString.call(d) === "[object Date]" ) { // it is a date if ( isNaN( d.getTime() ) ) { // d.valueOf() could also work // date is not valid } else { // date is valid } } else { // not a date }
转载于:https://www.cnblogs.com/Aaron-Lee/p/6007693.html
相关资源:数据结构—成绩单生成器
转载请注明原文地址: https://mac.8miu.com/read-3420.html