Forum Moderators: open
(Website Name) :: Wednesday, September 22, 2004
I would like to take out the Wednesday part of the script. In the end, I would like it to look like this:
(Website Name) :: September 22, 2004
I am wondering how to safely take out the "Wednesday" part. The code is below:
<script language="JavaScript1.2">
<!--hidevar isnMonth = new
Array("January","February","March","April","May","June","July","August","September","October","November","December");
var isnDay = new
Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");
today = new Date () ;
Year=today.getYear();
if (Year < 1000)
Year+=1900
Date=today.getDate();
function setdate(){
document.title="Website Name :: "+isnDay[today.getDay()]+", "+isnMonth[today.getMonth()]+" "+Date+", "+Year+""
}
if (document.all)
setdate()
else if (document.getElementById)
window.onload=setdate
//--hide-->
</script>
Thanks in advance!
You can remove the day array completely:
Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");
And then remove the highlighted portion of this line:
document.title="Website Name :: "+isnDay[today.getDay()]+", "+isnMonth[today.getMonth()]+" "+Date+", "+Year+""