/**
* 判断是否是日期格式
* @param { Date } date 传入的日期: new Date() 或者 "2002-03-22" 或者 "2002/03/22" 等
*/
const isTypeDateFormat = (date) => !isNaN(Date.parse(date)) || date instanceof Date;
【JS】判断传入的内容是否是日期时间
猜你喜欢
转载自blog.csdn.net/weixin_44244230/article/details/132086656
今日推荐
周排行