JavaScript 判断日期是否正确
const isDateValid = (...val) => !Number.isNaN(new Date(...val).valueOf());
let result = isDateValid("2022-10-10 16:16:00"); // true
console.log(result);
本文来自博客园,作者:重庆熊猫,转载请注明原文链接:https://www.cnblogs.com/cqpanda/p/16808556.html