Getting someone's age from dob and current year

Warren Samples warren at warrensweb.us
Sun Jul 31 00:03:40 EDT 2011


On Saturday, July 30, 2011 07:16:44 PM Roger Eller wrote:
>    convert tToday to seconds
>    convert tBorn to seconds


It's been talked about before, but this calls for a reminder: attempting to convert a date prior to Jan 1, 
1970 to "seconds" returns "invalid date" instead of a number in Windows. Don't do this if you are going to 
need this to work in Windows! Under Windows, you need to subtract the birthyear from the current year and 
determine if the current month/day is later than the birth month/day and subtract one year if necessary. 
Conveniently, this methods does work on all platforms. 

Best,

Warren




More information about the use-livecode mailing list