newbie requires help

Rob Cozens rcozens at pon.net
Sun Jan 25 12:01:58 EST 2004


>I see now it is not always correct: someone born on January 31, 2004 
>would show an age of 29 days on February 2, 2004 instead of 2 days.
>
>Let me see what it takes to deal with this...

Done...I think.  Substitute this if statement for the one in my 
original example:

if daysOld < 0 then
   put item 3 of secondDate into daysOld
   subtract daysOld from item 3 of secondDate -- set date to last day 
of previous month
   add (item 3 of secondDate)-min((item 3 of firstDate),(item 3 of 
secondDate)) to daysOld
   subtract 1 from monthsOld
end if

-- 

Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.net/who.htm

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)


More information about the use-livecode mailing list