F
François Laroche
hey guys,
I need help with a script:
<script>
var dayarray=new Array("Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi")
var montharray=new Array("Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre")
function getthedate(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var cdate="<small><font color='000000'
face='Arial'><b>"+dayarray[day]+" "+daym+" "+montharray[month]+"
"+year+"</b></font></small>"
if (document.all)
document.all.clock.innerHTML=cdate
else if (document.getElementById)
document.getElementById("clock").innerHTML=cdate
else
document.write(cdate)
}
if (!document.all&&!document.getElementById)
getthedate()
function goforit(){
if (document.all||document.getElementById)
setInterval("getthedate()",1)
}
</script>
<span id="clock"></span>
There is my problem, this script will show me the date, and it works,
perfectly, but I need to make some change... I want it to show me
today's date, the date of tomorrow AND the date in 2 days.
for example, I want it to show:
April 30, 2004 (<---------today's date)
May 1, 2004
May 2, 2004
and if you are wondering why I need this... there will be a link
beside each date to download the teetimes of the day (working in a
golf club, and Im the webmaster)
Thx for your help!
and sorry if my english isn't prefect....
-Frank
I need help with a script:
<script>
var dayarray=new Array("Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi")
var montharray=new Array("Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre")
function getthedate(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var cdate="<small><font color='000000'
face='Arial'><b>"+dayarray[day]+" "+daym+" "+montharray[month]+"
"+year+"</b></font></small>"
if (document.all)
document.all.clock.innerHTML=cdate
else if (document.getElementById)
document.getElementById("clock").innerHTML=cdate
else
document.write(cdate)
}
if (!document.all&&!document.getElementById)
getthedate()
function goforit(){
if (document.all||document.getElementById)
setInterval("getthedate()",1)
}
</script>
<span id="clock"></span>
There is my problem, this script will show me the date, and it works,
perfectly, but I need to make some change... I want it to show me
today's date, the date of tomorrow AND the date in 2 days.
for example, I want it to show:
April 30, 2004 (<---------today's date)
May 1, 2004
May 2, 2004
and if you are wondering why I need this... there will be a link
beside each date to download the teetimes of the day (working in a
golf club, and Im the webmaster)
Thx for your help!
and sorry if my english isn't prefect....
-Frank