savsoft,
<script>
function dateFormat(date) {
date = date.toLocaleDateString("ru").split(".");
return date[2] + "-" + date[1] + "-" + date[0]
}
function getDates(date)
{ var arr = [];
date = new Date(date);
if(!date) return arr;
var days = 7;
date.setDate(date.getDate() + days);
var month = date.getMonth();
while (date.getMonth() == month) {
arr.push(dateFormat(date))
date.setDate(date.getDate() + days);
}
return arr;
}
document.write(getDates(new Date(2020, 2, 3).getTime()))
</script>