
 var CurDate;   var CurMonth; var CurYear;  var CurHour;  var CurMinute; var CurDay; var CurWeekDay; var CurrentYear;
 var PresentDate;
 
 now = new Date();
 CurMonth = now.getMonth();
 CurYear = now.getYear();
 CurHour = now.getHours();
 CurMinute = now.getMinutes();
 CurDate = now.getDate(); //this contains current date
 
 if(CurDate < 10){
 	CurDate = "0" + CurDate;
 }
 if(CurHour < 10){
 	CurHour = "0" + CurHour;
 }
 if(CurMinute < 10){
 	CurMinute = "0" + CurMinute;
 }
  
 //assign the month name
 if (CurMonth == "0") {CurrentMonth = "01";}
 if (CurMonth == "1") {CurrentMonth = "02";}
 if (CurMonth == "2") {CurrentMonth = "03";}
 if (CurMonth == "3") {CurrentMonth = "04";}
 if (CurMonth == "4") {CurrentMonth = "05";}
 if (CurMonth == "5") {CurrentMonth = "06";}
 if (CurMonth == "6") {CurrentMonth = "07";}
 if (CurMonth == "7") {CurrentMonth = "08";}
 if (CurMonth == "8") {CurrentMonth = "09";}
 if (CurMonth == "9") {CurrentMonth = "10";}
 if (CurMonth == "10") {CurrentMonth = "11";}
 if (CurMonth == "11") {CurrentMonth = "12";}
 //CurrentMonth contains the current month
  
 if (CurYear < 1900) {CurrentYear = (CurYear + 1900);}
 else {CurrentYear = CurYear;}
 //PresentDate contains the date in the format e.g. Tuesday 24, 1973. 
 
 PresentDate = (CurDate + "/" + CurrentMonth + "/" + CurrentYear + "<br>" + CurHour +":" + CurMinute); 
 

