Age calculation script

Roger.E.Eller at sealedair.com Roger.E.Eller at sealedair.com
Sat Sep 9 15:25:46 EDT 2006


Jim Ault wrote:
> 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

I just tested this again on a Mac and WinXP machine. I think we have 
uncovered a platform-specific bug.

----------------------- Windows 2000 and XP ----
1970,1,6,1,0,0,3
1970,1,5,1,0,0,2
1970,1,4,1,0,0,1
1970,1,3,1,0,0,7
1970,1,2,1,0,0,6
1970,1,1,1,0,0,5
-64800
-151200
-237600
-324000
-410400
-496800

----------------------- Mac OS X 10.4 ----
1970,1,6,1,0,0,3
1970,1,5,1,0,0,2
1970,1,4,1,0,0,1
1970,1,3,1,0,0,7
1970,1,2,1,0,0,6
1970,1,1,1,0,0,5
1969,12,31,1,0,1,4
1969,12,30,1,0,1,3
1969,12,29,1,0,1,2
1969,12,28,1,0,1,1
1969,12,27,1,0,1,7
1969,12,26,1,0,1,6

Roger Eller <roger.e.eller at sealedair.com>




More information about the use-livecode mailing list