<script type="text/javascript"> function calculateAge(birthMonth, birthDay, birthYear) { todayDate = new Date(); todayYear = todayDate.getFullYear(); todayMonth = todayDate.getMonth(); todayDay = todayDate.getDate(); age = todayYear - birthYear; if (todayMonth < birthMonth - 1) { age--; } if (birthMonth - 1 == todayMonth && todayDay < birthDay) { age--; } return age; } </script> <script type="text/javascript"> document.write("She is " + calculateAge(11,2,1992) + " years old" ); </script>
© Copyright 2010-2012
ROM Cartridge
Newer Post
Home