📅  最后修改于: 2022-03-11 15:01:33.879000             🧑  作者: Mango
var now = new Date();
var daysOfYear = [];
for (var d = new Date(2012, 0, 1); d <= now; d.setDate(d.getDate() + 1)) {
daysOfYear.push(new Date(d));
}