Finished calendar.js (for now)
This commit is contained in:
+3
@@ -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");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user