I have managed to tinker with the Calendar plugin for OG, but I don’t find the way to make the weeks start on Monday. Has anyone done it?
Solved!
function startingWeekdayIndexForMonth(month, year){
// returns 0-6 with 0 as Sunday
wday = new Date(year, month - 1, 1).getDay();
return (wday + 6) % 7;
}
function weekCount(month, year){
lastOfMonth = new Date(year, month, 0);
used = startingWeekdayIndexForMonth(month, year) + lastOfMonth.getDate();
return Math.ceil( used / 7);
}
function nameOfMonth(month, locale){
yr = new Date().getFullYear();
objDate = new Date(yr, month - 1, 1);
return objDate.toLocaleString(locale,{month:"long"});
}