new date conversion bug?

Colin Holgate coiin at rcn.com
Thu Jan 31 16:40:31 EST 2008


At 1:52 PM -0700 1/31/08, Devin Asay wrote:
>This works fine for a few weeks, but then inexplicably fails. For 
>example, Jan. 11, Jan. 25, Feb. 8, Feb. 22, and March 7 all show the 
>event properly. But anything after that fails; i.e., March 21, April 
>4.


It appears to be something odd about March 9th, and not to do with 
the number of days apart they are. Try this:

convert "3/9/2008" to seconds; put it into tD1; put tD1
convert "3/10/2008" to seconds; put it into tD2; put cr & tD2 after msg
put cr & (tD2 - tD1) mod (24*60*60) after msg

1205038800
1205121600
82800

Now, you would think that March 10th was exactly a day after March 
9th, but it appears not to be. In HyperCard it is:

on dd
   convert "3/9/2008" to seconds
   put it into tD1
   convert "3/10/2008" to seconds
   put it into tD2
   put (tD2 - tD1) mod (24*60*60)
end dd

0



More information about the use-livecode mailing list