Fraya Pohl wrote:
Ich want to count the days between the current day an the birthday
next Year. For example (mm.dd.yyyy): Today : 07.01.2004 Birthday:
07.06.1977. How can I calculate the days to the next birthday ??
Please help me !! Thanks Fraya Pohl
<script language="javascript" type="text/javascript">
//<![CDATA[
<!-- Countdown Script by Maxim V. Kollegov -->
<!--
http://www.geocities.com/siliconvalley/lakes/8620 -->
<!-- please keep this comment unchanged if you use it -->
<!-- hide script
//change your event date event here.
var eventdate = new Date("Sep 21, 2011 00:00:00");
function toSt(n)
{s=""
if(n<10) s+="0"
return s+n.toString();
}
function countdown()
{cl=document.clock;
d=new Date();
count=Math.floor((eventdate.getTime()-d.getTime())/1000);
if(count<=0)
{cl.days.value ="----";
cl.hours.value="--";
cl.mins.value="--";
cl.secs.value="--";
return;
}
cl.secs.value=toSt(count%60);
count=Math.floor(count/60);
cl.mins.value=toSt(count%60);
count=Math.floor(count/60);
cl.hours.value=toSt(count%24);
count=Math.floor(count/24);
cl.days.value=count;
setTimeout("countdown()",500);
}
// end script -->
//]]>
</script>
<body bgcolor="#E0E0E0" text="#404040" link="#FF6600" vlink=
"#808080" onload="countdown()">
<form name="clock" action="countdown" id="clock"><font face=
"Times"><b>Nog <input type="text" name="days" size="4" />dagen,
<input type="text" name="hours" size="2" />uren, <input type=
"text" name="mins" size="2" />minuten en <input type="text" name=
"secs" size="2" />seconden,<br />
dan is het 21 september 2011<br />
Die dag is het zeventig jaar geleden dat ik ben
geboren.</b></font></form>
Gerard Schaefers
--
Voor meer kook- en eetplezier? Kijk hier!
http://www.xs4all.nl/~sjeef/Nederlands/Recepten.html