catinabag1
2009-01-01, 10:48 AM
1084: Syntax error: expecting colon before plus.
1083: Syntax error: rightbrace is unexpected.
(line 71 for both) which is second from bottom
mydate = new Date();
seconds = mydate.getSeconds();
minutes = mydate.getMinutes();
hours = mydate.getHours();
day = mydate.getDay();
date = mydate.getDate();
month = mydate.getMonth();
year = mydate.getFullYear();
if (day==0){
day = "Sunday"
} else if (day==1){
day = "Monday"
} else if (day==2){
day = "Tuesday"
} else if (day==3){
day = "Wednesday"
} else if (day==4){
day = "Thursday"
} else if (day==5){
day = "Friday"
} else if (day==6){
day = "Saturday"
}
if (month==0){
month = "January"
} else if (month==1){
month = "February"
} else if (month==2){
month = "March"
} else if (month==3){
month = "April"
} else if (month==4){
month = "May"
} else if (month==5){
month = "June"
} else if (month==6){
month = "July"
} else if (month==7){
month = "August"
} else if (month==8){
month = "September"
} else if (month==9){
month = "October"
} else if (month==10){
month = "November"
} else if (month==11){
month = "December"
}
if (minutes<10){
minutes = "0"+minutes;
}
if (seconds<10) {
seconds = "0"+seconds;
}
if (hours>12){
hours = hours-12;
ampm = "PM";
} else if (hours == 12){
ampm = "PM";
} else {
ampm = "AM";
}
if (hours == 0){
hours = 12;
}
time = {(hours) + ":" + (minutes) + ":" + (seconds) + " " + (ampm)};
datefinal = {(day) + " " + (month) + " " + (date) + " " + (year)};
1083: Syntax error: rightbrace is unexpected.
(line 71 for both) which is second from bottom
mydate = new Date();
seconds = mydate.getSeconds();
minutes = mydate.getMinutes();
hours = mydate.getHours();
day = mydate.getDay();
date = mydate.getDate();
month = mydate.getMonth();
year = mydate.getFullYear();
if (day==0){
day = "Sunday"
} else if (day==1){
day = "Monday"
} else if (day==2){
day = "Tuesday"
} else if (day==3){
day = "Wednesday"
} else if (day==4){
day = "Thursday"
} else if (day==5){
day = "Friday"
} else if (day==6){
day = "Saturday"
}
if (month==0){
month = "January"
} else if (month==1){
month = "February"
} else if (month==2){
month = "March"
} else if (month==3){
month = "April"
} else if (month==4){
month = "May"
} else if (month==5){
month = "June"
} else if (month==6){
month = "July"
} else if (month==7){
month = "August"
} else if (month==8){
month = "September"
} else if (month==9){
month = "October"
} else if (month==10){
month = "November"
} else if (month==11){
month = "December"
}
if (minutes<10){
minutes = "0"+minutes;
}
if (seconds<10) {
seconds = "0"+seconds;
}
if (hours>12){
hours = hours-12;
ampm = "PM";
} else if (hours == 12){
ampm = "PM";
} else {
ampm = "AM";
}
if (hours == 0){
hours = 12;
}
time = {(hours) + ":" + (minutes) + ":" + (seconds) + " " + (ampm)};
datefinal = {(day) + " " + (month) + " " + (date) + " " + (year)};