function getMonday() {
var curr = new Date; // get current date
var first = curr.getDate() - curr.getDay() +8; // First day is the day of the month - the day
return new Date(curr.setDate(first)).toDateString();
}
function getTuesday(d) {
var curr = new Date; // get current date
var first = curr.getDate() - curr.getDay(); // First day is the day of the month - the day of the week
var second= first + 2; // second day is the first day + 9
return new Date(curr.setDate(second)).toDateString();
}
function getThursday(d) {
var curr = new Date; // get current date
var first = curr.getDate() - curr.getDay(); // First day is the day of the month - the day of the week
var second= first + 4; // second day is the first day + 11
return new Date(curr.setDate(second)).toDateString();
}
function getFriday(d) {
var curr = new Date; // get current date
var first = curr.getDate() - curr.getDay(); // First day is the day of the month - the day of the week
var second= first + 5; // second day is the first day + 12
return new Date(curr.setDate(second)).toDateString();
}
window.onload = function(){
var monday= getMonday();
var tuesday= getTuesday(new Date());
var thursday= getThursday(new Date());
var friday= getFriday(new Date());
document.getElementById('monday').innerHTML = monday;
document.getElementById('tuesday').innerHTML = tuesday;
document.getElementById('thursday').innerHTML = thursday;
document.getElementById('friday').innerHTML = friday;
};