I am trying to work on something very simple in Javascript. I need the script to print out the date in the following format: yyyymmdd
/yyyymmdd
.
I just cant get the following script to work. It feeds a google calendar to output current Day view.
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();
if(dd<10){dd='0'+dd} if(mm<10){mm='0'+mm} today = yyyy+''+mm+''+dd;
document.write ('<iframe src="https://www.google.com/calendar/embed?
showTitle=0&dates=today"/"today&mode=DAY&height=1200&wkst=1&hl=en_GB&bgcolor
=%23FFFFFF&src=my cal source&color=%23711616&ctz=Etc%2FGMT" style=" border:solid
1px #777 " width="950" height="715"frameborder="0" scrolling="no"></iframe>');