3 Replies Latest reply on Apr 21, 2006 7:29 AM by kglad

    age calculator

    Solo27
      im trying to make a calcutator that will calculate someones age from their DOB and the current date so that I dont have to keep updating profiles. This is what i have made so far:

      var year = year.getUTCFullYear();
      var month = month.getUTCMonth();
      var day = day.getUTCDay()
      var preage = year - 1990
      var age = {
      if(month < 8) {
      preage - 1
      }
      else if(day < 20) {}

      preage - 1
      }
      }

      What is wrong with this script please. I also need to know how to show the result in a text box please.