I have a file that calculates someones age to the current date. In one
field you type the date, and in the other the age appears. I need it to
calculate a persons age at October 1, 2010 instead of the current date.
I do not know how to attach the file so here is the xml code as it
appears in LiveCycle
Date of Birth:
Age
var ageInYears = 0; var
birthDate = new Date(); if ( DOB.rawValue != null ) { // Get current
date, and convert user-entered date to a Date object. var curDate = new
Date(); birthDate.setTime(Date.parse(DOB.rawValue)); // Set initial age,
current year - birth year ageInYears = curDate.getFullYear() -
birthDate.getFullYear(); // If we haven't reached the birth month yet,
not yet 1 year older... if ( curDate.getMonth() <
birthDate.getMonth() ) ageInYears--; // If this month is same as birth
month but we haven't reached the // birth date yet, not yet 1 year
older... if ( curDate.getMonth() == birthDate.getMonth() ) if (
curDate.getDate() < birthDate.getDate() ) ageInYears--; // Set age in
result field. this.rawValue = ageInYears; }
8.2.1.3158.1.475346.466429
pdf
1.7
1
<runScripts>server</runScripts> *
January
February March April
May June July
August Septemb...