Devin Asay wrote:
function getAge pDate
put the date into tNow
convert pDate to dateitems
convert tNow to dateitems
repeat with x = 1 to 3
put item x of tNow - item x of pDate & comma after tAge
end repeat
if item 2 of tAge < 0 or item 3 of tAge < 0
Shouldn't this be
if item 2 of tAge < 0 OR (item 2 of tAge = 0 AND item 3 of tAge < 0)
Otherwise it returns the wrong age if the day of the month is less than
the day of the month of the birthdate.
then subtract 1 from item 1 of tAge
return item 1 of tAge
end getAge
Good catch. Yes, it should be what you say. So much for quick solutions. :)
--
Jacqueline Landman Gay | [email protected]
HyperActive Software | http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution