//Iris Tsing, Lab 5

/*
# A script/function which returns a string which contains the name of the current weekday (Sunday, Monday, etc.) is needed.# A script/function to insert the current date is needed. The format should be Today is Weekday, Month Day, Year. The example above shows the location. It is contained within the HTML DIV element id=datebox.# A script to insert the daily schedule page is needed. The location is underneath the text Today at the Union within the empty paragraph tags. Using JavaScript, write the HTML command for an iframe containing the correct daily HTML file.    * An iframe is inserted using the HTML command <iframe="whatever.html"></iframe>
*/

//date info
var today = new Date(); //contains current datevar thisDay = today.getDay();  //pulls out the number of the day of the week 0 (Sunday) to 6 (Saturday)var thisDate = today.getDate();  //pulls out the date's day of the month (1-31)var thisMonth = today.getMonth(); //returns a number from 0 (Jan) to 11 (Dec)var thisYear = today.getFullYear();  //returns four-digit year

// use var "thisDay"var weekDay = new Array(7);

weekDay[0] = "Sunday";weekDay[1] = "Monday";weekDay[2] = "Tuesday";weekDay[3] = "Wednesday";weekDay[4] = "Thursday";weekDay[5] = "Friday";weekDay[6] = "Saturday";

//use var "thisMonth"var month = new Array(12);
month[0] = "January";month[1] = "February";month[2] = "March";month[3] = "April";month[4] = "May";month[5] = "June";month[6] = "July";month[7] = "August";month[8] = "September";month[9] = "October";month[10] = "November";month[11] = "December";function printCurrentDate() {  document.write("Today is <br />" + weekDay[thisDay] + ", " + month[thisMonth] +" " + thisDate  + ", " + thisYear);}