sce@runxtsa.runx.oz.au (Simon Evans) (12/11/89)
I have been unable to get the Script Manager (v$020E -- 2.14 in System 6.0.2) to correctly parse the time and date "09:13 5/23/89", for example. The problem is that String2Time dutifully follows the syntax given in the documentation, time := number [tSep number [tSep number]] [mornStr | eveStr | timeSuff] tSep := timeSep | sep sep := <non-alphanumeric> interprets the space as a separator, and swallows the 5 as the seconds field of the time. Then all that is left for String2Date is "/23/89" which it understandably fails to make much sense of. (String2Time will in fact parse "09:13 This is extraneous 54 trombones" identically, adding extraneousStrings to the result code -- ie it gives a time of 09:13:54). The main question -- Is there any way to stop String2Time hunting for seconds, or do I have to insist that users either include seconds or write the date as "5/23/89 09:13"?? Am I missing something really obvious?? If this isn't a bug in the Script Manager, it is at least very annoying. If I have to code around this problem, the whole point of the Script Manager/ International Utilities is lost. The routine is documented as being semantically driven, and smarter than the pure syntax would indicate. Perhaps it should be smart enough to deal with this a little better?? Simon Evans. AppleLink: AUST0134 (JAM Software), or followup to news.