📅  最后修改于: 2022-03-11 15:03:11.989000             🧑  作者: Mango
function randomDate(start, end) {
return new Date(start.getTime() + Math.random() * (end.getTime() - start.getTime()));
}
randomDate(new Date(2012, 0, 1), new Date())