Problem with Convert

Ken Ray kray at sonsothunder.com
Sun Feb 5 00:29:28 EST 2012


On Feb 4, 2012, at 4:33 PM, Pete wrote:

> I just ran into what is either a bad misunderstanding on my part or a bug.

Pete, see Bug #9893 in Bugzilla: http://quality.runrev.com/show_bug.cgi?id=9893

It's actually a misunderstanding and not a bug… here's the reason:

When you do:

    convert the system date to dateItems

LC reacts to this by interpreting the syntax as:

    convert <date> to dateItems

Even though you provided "the system date" as what to be converted, it would be the equivalent of:

   put the system date into tDate
   convert tDate to dateItems

Since you aren't telling LC what to convert *from*, it assumes that what it is converting is a US date. Using my example above, you'd need to do:

   put the system date into tDate
   convert tDate from system date to dateItems

So, although it may seem weird, using your original statement you'd need to do:

   convert the system date from system date to dateItems

The bug I mentioned above was originally posted by me as a functional bug, but what it turned into was a documentation bug… 

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/	




More information about the use-livecode mailing list