Age calculation script
Jim Ault
JimAultWins at yahoo.com
Sat Sep 9 14:51:57 EDT 2006
Must be something about the system we don't understand.
I am on Rev 2.7.2, OSX 10.4.7
Try this loop, then look at the msgbox, or copy paste to another app
on showDateList
put the short date into noww
convert noww to seconds
put 24*60*60 into hr24
repeat with x = (35*365) to (100*365)
put noww - (x*hr24) into past
convert past to dateitems
put past & cr after newList
end repeat
put newList into msg
end showDateList
Jim Ault
Las Vegas
On 9/9/06 11:16 AM, "Roger.E.Eller at sealedair.com"
<Roger.E.Eller at sealedair.com> wrote:
>>> It appears that any birth year before 1970 results in an incorrect
>>> calculation. Entering 5/18/65, the result is: days old = 54750 years
> old =
>>> 149 exact years old = 149.945205 next
>>> Bday = 20 days from now
>>>
>> Hmmmm, my version seems to work fine. Maybe I did a typo or something
> in
>> building the message to the list.
> ...
>
>> here is the fresh version of the script I am using.
>> See if it makes a difference
>
> Jim,
>
> The "fresh" version results in: days old = 36500 years old = 99 exact years
> old = 99.975342 next Bday
> = 9 days from now
> for ANY date that has a year earlier than 1970. I tried it in 2.6.1 and
> 2.7.3. I am using Rev in Windows 2000. I even tried changing the
> centuryCutoff... same results.
>
> Roger Eller <roger.e.eller at sealedair.com>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list