📅  最后修改于: 2022-03-11 14:48:21.056000             🧑  作者: Mango
//If you want a date of type yyy-mm-dd
const date_check = /^\d{4}-\d{2}-\d{2}$/;
let check = date.match(data_check)
if(check1 == null)
alert('invalid date');