Re: Date math problem in Leopard
Re: Date math problem in Leopard
- Subject: Re: Date math problem in Leopard
- From: KOENIG Yvan <email@hidden>
- Date: Sat, 15 Mar 2008 18:16:54 +0100
Hello,
I tried
--
set newIssue to 1056
set firstIssue to date "jeudi 24 décembre 1987 12:00:0"
set limite to 887 (* OK with 887, wrong with 888 *)
repeat while newIssue > limite
set firstIssue to firstIssue + (limite * weeks)
set newIssue to newIssue - limite
end repeat
set newDate to firstIssue + (newIssue * weeks)
--
log newIssue -- value is 1056 to be published Mar. 20, 2008
log (newDate as text)
log limite * weeks -- (*5.364576E+8*)
log (2 ^ 30) / 2 -- (*5.36870912E+8*)
log (limite + 1) * weeks -- (*5.370624E+8*)
log (2 ^ 30) / (limite * weeks) -- (*2.001540893446*)
log (2 ^ 30) / ((limite + 1) * weeks) -- (*1.999286905954*)
it appears that the bug is not starting at 2^30
but around .5 * (2^30),
and that with a slightly modified script, we may live with the bug ;-)
Yvan KOENIG _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden