Finished calendar.js (for now)

This commit is contained in:
2020-06-26 13:07:57 +02:00
parent 812ff6e855
commit df8eb6c8cb
4 changed files with 12 additions and 9 deletions
+3
View File
@@ -31,6 +31,9 @@ const moment = require("moment");
function generateCalendar(weekOffset = 0) {
const week = (moment().week() + weekOffset);
document.getElementById("title").innerText = week;
let weekDays = Array.apply(null, Array(7)).map((value, index) => {
return moment(index, "e").locale("da").startOf("week").weekday(index).format("ddd");
});