use this function. it will return an integer value equal to the persons age, if sent the birthdate.<br><br>function getAge(year,month,day){<br>var age=0;<br>var currentDate=new Date();<br>var date=currentDate.getDate();<br>var yr=currentDate.getYear();<br>var mo=currentDate.getMonth();<br>if (yr<100){<br>yr="19"+yr;<br>yr=yr.parseInt()<br>//this doublechecks to make sure that the year is in the <br>//correct format, if the user's pc clock is set back in <br>//time.<br>}<br>month=month-1;<br>age=yr-year;<br>if (month<mo) age++;<br>if (month==mo) if (day<=date) age++;<br><br>return age;<br>}<br><br><br>the format for the dates is (using today as an example):<br><br>year: 2000<br>day: 16<br>month: 8<br><br>using january 1st, 1999:<br><br>year: 1999<br>day: 1<br>month: 1<br><br>so, do this: document.write('You are '+getAge(YEAR,MONTH,DAY)+' years old');<br><br><br> <p>theEclipse<br><a href=mailto:eclipse_web@hotmail.com>eclipse_web@hotmail.com</a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>**-Trying to build a documentation of a Javascript DOM, crossbrowser, of course. E-mail me if you know of any little known events and/or methods, etc.