date anomalies when converting to seconds
Chris Sheffield
cmsheffield at gmail.com
Mon May 22 11:39:25 EDT 2006
This is one for those of you developing for both Mac and Windows. I'm
running into a very strange problem, and I'm not sure if it's a Rev
bug or if it has something to do with hardware differences between
Macs and PCs.
Here's a code snippet:
put "01/06/2006" into tDate
convert tDate to seconds
put tDate
Run this in the message box on both a Mac and a PC. See the different
results. Anyone know why this would happen? What I'm ultimately doing
is converting two dates to seconds and then calculating the number of
weeks that have passed between the two dates. I discovered that my
calculations were incorrect on the PC, and my debugging led me to
this. The value on the Mac seems to be the correct one. What's
strange is some dates seem to be correct when converting to seconds,
but others are not. Try "04/28/2006" for example. Converting to
seconds results in the same value on both platforms.
Can anyone help with this? Or does anyone have another way of
calculating the number of weeks between two dates without converting
to seconds first? Have I found a bug I need to report?
Thanks,
Chris
------------------------------------------
Chris Sheffield
Read Naturally
The Fluency Company
http://www.readnaturally.com
------------------------------------------
More information about the use-livecode
mailing list