JavaScript Invalid Date Verify

mac2022-06-30  127

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

相关资源:数据结构—成绩单生成器
最新回复(0)