Per [link: http://www.w3schools.com/jsref/jsref_parseInt.asp]w3schools javascript ref[/url],
Since your strings begin with "0", but 8 and 9 are invalid octal digits, you get 0.
Change all of your calls to the form: parseInt(birthdate1.substr(2,2),10)
and you should be fine.
IBM Certified...