tgreer: you do often suggest a server-side solution... which is funny because this is a client side forum. However, I agree.. if redsabre wanted a production sensible solution, this would be done server side using a database holding important peoples data. But I don't think redsabre wants a sensible solution here... i think the redsabre just wants someone to write a javascript that can be posted onto redsabre's website.
redsabre: using the javascript that you have supplied a link to, you should be able to work out how old someone is. It is easy to work out how many days old someone is from the code... it isn't such a big step to work out everything else.... and i've ended up doing it.. so here it is, based on the link you gave me.
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
function countup(yr,m,d) {
var today=new Date();
var todayy=today.getYear();
// Y2K Fix by Isaac Powell
// http://onyx.idbsu.edu/~ipowell
if ((navigator.appName == "Microsoft Internet Explorer") && (todayy < 2000))
todayy="19" + todayy;
if (navigator.appName == "Netscape")
todayy=1900 + todayy;
var todaym=today.getMonth();
var todayd=today.getDate();
var todaystring=montharray[todaym]+" "+todayd+", "+todayy;
var paststring=montharray[m-1]+" "+d+", "+yr;
document.write(paststring + " <br/>");
var oldDate = new Date(paststring);
var dyears = today.getFullYear() - oldDate.getFullYear();
var dmonths = today.getMonth() - oldDate.getMonth();
var ddays = today.getDate() - oldDate.getDate();
var dhours = today.getHours() - oldDate.getHours();
var dminutes= today.getMinutes() - oldDate.getMinutes();
var dseconds= today.getSeconds() - oldDate.getSeconds();
var dmillis = today.getMilliseconds() - oldDate.getMilliseconds();
if(dmillis < 0){
dmillis += 1000;
dseconds--;
}
if(dseconds < 0){
dseconds += 60;
dminutes--;
}
if(dminutes < 0){
dminutes += 60;
dhours--;
}
if(dhours < 0){
dhours += 24;
ddays--;
}
if(ddays < 0){
// would need to get the days of the month here
var dayMilli = 24*60*60*1000;
var newDateString = montharray[today.getMonth()] + " 1, " + today.getFullYear();
document.write(newDateString + " <br/>");
document.write(" last day of month = " +
Date.parse(newDateString) + " <br/>");
ddays +=
new Date(Date.parse(newDateString) - dayMilli).getDate();
dmonths--;
}
if(dmonths < 0){
dmonths += 12;
dyears--;
}
document.write((dyears) + " Years, " +
(dmonths) + " Months, " +
(ddays) + " Days, " +
(dhours) + " Hours, " +
(dminutes) + " Minutes, " +
(dseconds) + " Seconds, " +
(dmillis) + " Milliseconds " +
"old.<br/>");
}
countup(1997,8,29); // Date in format: (year,month,day)
// End -->
</script>
</head>
<body>
<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
</body></html>