📅  最后修改于: 2022-03-11 15:01:53.632000             🧑  作者: Mango
if (date.match(/^\d{4}-\d{2}-\d{2}$/) === null) {
//it is not a date with format YYYY-MM-DD
}
else
//it is a date with format YYYY-MM-DD