I have this huge thing of actionscript (See below) which I wrote my self and unsurprisingly it has some problems, it is meant to get the day, date and month values and switch them to get the text equivilent of that integer. Well not exactly it gets the day right at least but then it gave me the 3th (Try to pronounce that) of " " month. I am stuck? Here is the AS
[AS]
setInterval(dateSet,2500000000000000000000000000000);
function dateSet(){
var day = new Date().getDay();
var txtDay;
switch(day){
case 0:
txtDay = “Sunday”;
break;
case 1:
txtDay = “Monday”;
break;
case 2:
txtDay = “Tuesday”;
break;
case 3:
txtDay = “Wednesday”;
break;
case 4:
txtDay = “Thursday”;
break;
case 5:
txtDay = “Friday”;
break;
case 6:
txtDay = “Saturday”;
break;
default:
txtDay = “Error”;
break;
}
var date = new Date().getDate();
var txtDate;
switch (date){
case 1:
txtDate = “1st”;
break;
case 2:
txtDate = “2nd”;
break;
case 3:
txtDate = “3rd”;
break;
case 21:
txtDate = “21st”;
break;
case 22:
txtDate = “22nd”;
break;
case 23:
txtDate = “23rd”;
break;
case 31:
txtDate = “31st”;
break;
default:
txtDate = day + “th”;
break;
}
var txtMonth = new Date().getMonth();
var txtMonth
switch (month){
case 0:
txtMonth = “January”;
break;
case 1:
txtMonth = “February”;
break;
case 2:
txtMonth = “March”;
break;
case 3:
txtMonth = “April”;
break;
case 4:
txtMonth = “May”;
break;
case 5:
txtMonth = “June”;
break;
case 6:
txtMonth = “July”;
break;
case 7:
txtMonth = “August”;
break;
case 8:
txtMonth = “September”;
break;
case 9:
txtMonth = “October”;
break;
case 10:
txtMonth = “November”;
break;
case 11:
txtMonth = “December”;
break;
}
_root.txtOveralDate = txtDay + ", " + txtDate + ", " + txtMonth;
}
[/AS]